GET api/v1/search/all-products?q={q}&size={size}&page={page}

Searches drug products and returns a full result for the supplied search term. The default values for size and page are both 0, resulting in the complete list being returned. Should you decide to use the paging feature, pages are 0 indexed

Request Information

URI Parameters

NameDescriptionTypeAdditional information
q

The search query

string

None.

size

The page size for the result set

integer

Default value is 0

page

The page number for the result set

integer

Default value is 0

Body Parameters

None.

Response Information

Resource Description

A result set containing results for the product search

AllProductSearchResponse
NameDescriptionTypeAdditional information
count

integer

None.

totalItems

integer

None.

page

integer

None.

pageSize

integer

None.

items

Collection of AllProductsSearchItem

None.

_links

Collection of Link

None.

_languages

Collection of LanguagesLink

None.

Response Codes

CodeDescriptionAdditional information
200OKThe request returned without error
204No ContentThe request was successful but no results were returned
400Bad RequestA parameter was missing or invalid
404Not FoundThe requested resource was not found

Response Formats

application/json, text/json

Sample:
{
  "_links": [
    {
      "rel": "sample string 1",
      "locale": "sample string 4",
      "href": "sample string 2",
      "templated": true
    },
    {
      "rel": "sample string 1",
      "locale": "sample string 4",
      "href": "sample string 2",
      "templated": true
    }
  ],
  "_languages": [
    {
      "rel": "sample string 1",
      "locale": "sample string 3",
      "name": "sample string 4",
      "href": "sample string 2"
    },
    {
      "rel": "sample string 1",
      "locale": "sample string 3",
      "name": "sample string 4",
      "href": "sample string 2"
    }
  ],
  "count": 1,
  "totalItems": 2,
  "page": 3,
  "pageSize": 4,
  "items": [
    {
      "gpcId": 1,
      "ndc9": "sample string 2",
      "ndc10": [
        "sample string 1",
        "sample string 2"
      ],
      "ndc11": [
        "sample string 1",
        "sample string 2"
      ],
      "productId": 3,
      "cpnum": 4,
      "name": "sample string 5",
      "offMarketDate": "2023-02-07T01:38:15.3241284-05:00",
      "_links": [
        {
          "rel": "sample string 1",
          "locale": "sample string 4",
          "href": "sample string 2",
          "templated": true
        },
        {
          "rel": "sample string 1",
          "locale": "sample string 4",
          "href": "sample string 2",
          "templated": true
        }
      ],
      "_languages": [
        {
          "rel": "sample string 1",
          "locale": "sample string 3",
          "name": "sample string 4",
          "href": "sample string 2"
        },
        {
          "rel": "sample string 1",
          "locale": "sample string 3",
          "name": "sample string 4",
          "href": "sample string 2"
        }
      ]
    },
    {
      "gpcId": 1,
      "ndc9": "sample string 2",
      "ndc10": [
        "sample string 1",
        "sample string 2"
      ],
      "ndc11": [
        "sample string 1",
        "sample string 2"
      ],
      "productId": 3,
      "cpnum": 4,
      "name": "sample string 5",
      "offMarketDate": "2023-02-07T01:38:15.3241284-05:00",
      "_links": [
        {
          "rel": "sample string 1",
          "locale": "sample string 4",
          "href": "sample string 2",
          "templated": true
        },
        {
          "rel": "sample string 1",
          "locale": "sample string 4",
          "href": "sample string 2",
          "templated": true
        }
      ],
      "_languages": [
        {
          "rel": "sample string 1",
          "locale": "sample string 3",
          "name": "sample string 4",
          "href": "sample string 2"
        },
        {
          "rel": "sample string 1",
          "locale": "sample string 3",
          "name": "sample string 4",
          "href": "sample string 2"
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<all-products xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <_languages>
    <languageslink>
      <rel>sample string 1</rel>
      <locale>sample string 3</locale>
      <name>sample string 4</name>
      <href>sample string 2</href>
    </languageslink>
    <languageslink>
      <rel>sample string 1</rel>
      <locale>sample string 3</locale>
      <name>sample string 4</name>
      <href>sample string 2</href>
    </languageslink>
  </_languages>
  <_links>
    <link>
      <rel>sample string 1</rel>
      <locale>sample string 4</locale>
      <href>sample string 2</href>
      <templated>true</templated>
    </link>
    <link>
      <rel>sample string 1</rel>
      <locale>sample string 4</locale>
      <href>sample string 2</href>
      <templated>true</templated>
    </link>
  </_links>
  <count>1</count>
  <totalItems>2</totalItems>
  <page>3</page>
  <pageSize>4</pageSize>
  <items>
    <product>
      <_languages>
        <languageslink>
          <rel>sample string 1</rel>
          <locale>sample string 3</locale>
          <name>sample string 4</name>
          <href>sample string 2</href>
        </languageslink>
        <languageslink>
          <rel>sample string 1</rel>
          <locale>sample string 3</locale>
          <name>sample string 4</name>
          <href>sample string 2</href>
        </languageslink>
      </_languages>
      <_links>
        <link>
          <rel>sample string 1</rel>
          <locale>sample string 4</locale>
          <href>sample string 2</href>
          <templated>true</templated>
        </link>
        <link>
          <rel>sample string 1</rel>
          <locale>sample string 4</locale>
          <href>sample string 2</href>
          <templated>true</templated>
        </link>
      </_links>
      <cpnum xmlns="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Search">4</cpnum>
      <name xmlns="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Search">sample string 5</name>
      <offMarketDate xmlns="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Search">2023-02-07T01:38:15.3241284-05:00</offMarketDate>
      <productId xmlns="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Search">3</productId>
      <gpcId>1</gpcId>
      <ndc10 xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </ndc10>
      <ndc11 xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </ndc11>
      <ndc9>sample string 2</ndc9>
    </product>
    <product>
      <_languages>
        <languageslink>
          <rel>sample string 1</rel>
          <locale>sample string 3</locale>
          <name>sample string 4</name>
          <href>sample string 2</href>
        </languageslink>
        <languageslink>
          <rel>sample string 1</rel>
          <locale>sample string 3</locale>
          <name>sample string 4</name>
          <href>sample string 2</href>
        </languageslink>
      </_languages>
      <_links>
        <link>
          <rel>sample string 1</rel>
          <locale>sample string 4</locale>
          <href>sample string 2</href>
          <templated>true</templated>
        </link>
        <link>
          <rel>sample string 1</rel>
          <locale>sample string 4</locale>
          <href>sample string 2</href>
          <templated>true</templated>
        </link>
      </_links>
      <cpnum xmlns="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Search">4</cpnum>
      <name xmlns="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Search">sample string 5</name>
      <offMarketDate xmlns="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Search">2023-02-07T01:38:15.3241284-05:00</offMarketDate>
      <productId xmlns="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Search">3</productId>
      <gpcId>1</gpcId>
      <ndc10 xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </ndc10>
      <ndc11 xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </ndc11>
      <ndc9>sample string 2</ndc9>
    </product>
  </items>
</all-products>