GET api/v1/interactions/drugs?q={q}&gpcid={gpcid}&cpnum={cpnum}

Returns a list of drugs matching the criteria, for use in interaction search. Parameters are exclusive, meaning you should only specify one.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
q

Optional string to match in product name

string

None.

gpcid

Optional gpcid to search for

integer

None.

cpnum

Optional CpNum to search for

integer

None.

Body Parameters

None.

Response Information

Resource Description

InteractionDrugResponse
NameDescriptionTypeAdditional information
count

integer

None.

searchResults

Collection of DrugModel

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,
  "searchResults": [
    {
      "gpcId": 1,
      "_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"
        }
      ],
      "name": "sample string 2"
    },
    {
      "gpcId": 1,
      "_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"
        }
      ],
      "name": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<interactionResponse 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>
  <searchResults>
    <drug>
      <_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>
      <gpcId>1</gpcId>
      <name>sample string 2</name>
    </drug>
    <drug>
      <_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>
      <gpcId>1</gpcId>
      <name>sample string 2</name>
    </drug>
  </searchResults>
</interactionResponse>