Skip to content
Medication Search
Attributes

Attributes

Medication Search

Inside Rx provides several endpoints design to return various medication related information. The Medication Attributes endpoint is designed to return details about a specific medication.

The Medication Search API is restricted with a x-api-key header. This API Key is provided when provisioning your account. It will authorize you for these endpoints, and is required for all requests.

Medication Attributes

The GET request is designed to get information on a specific medication, where the :slug is known from previous searches. The returned object is similar to other medication search endpoints, but is not enclosed within an array.

HTTP Request

GET https://services.insiderx.com/search/v1/attributes/:slug HTTP/1.1
Content-Type: application/json
x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt

Where x-api-key is the private key provided when provisioning an account. The example key above is for demonstration purposes.

Where :slug is a valid slug attribute provided through the Medication Search Query or Popular Searched Medications endpoints.

HTTP GET Params

paramDescription
localestring (optional) Localization of the medication attributes. Either en-US (default), or es-US

Response Types

CodeDescription
200Successful result returned.
400Missing :slug in path.
403Lack of permissions to use medication search service.
404Invalid :slug
500Internal server error, something went wrong.

Response Attributes

The following attributes are returned as a object within the response body. Dot notation is used to represent nested objects. Square bracket notation represents items are nested within an array.

AttributeDescription
idstring Internal ID used for tracking purposes.
namestring Generic or Brand name of the medication.
genericstring Generic name of the medication, can be a duplicate name attribute.
dose[].packageboolean True if the medication is a package.
dose[].labelstring Display label for the dose.
dose[].valuestring Value refers to the NDC for this specific strength and form.
dose[].baseValuestring Base Value used when calculating custom quantity to price.
dose[].unitLabelstring Display label for the unit.
dose[].quantity[].labelstring Display label for the quantity.
dose[].quantity[].valuestring Value of the quantity.
dose[].defaultQuantitystring Value of the most commonly prescribed quantity.
dose[].programboolean True if medication is covered in a special program that has additional restrictions. NOTE - Only applicable if your contract participates in that program.
dose[].doseFormstring Form for the dose.
defaultDosestring NDC of the most commonly prescribed dose.
slugstring External ID that is unique and URL friendly.
genericSlugstring The slug identifier of the generic version of this drug. It will be null if there is no generic version available.
statusCodeinteger (optional) HTTP status code in case of failure.
messagestring (optional) Error description.
errorCodestring (optional) Error Code for validation failures. See Error Codes.

Example CURL Request

curl https://services.insiderx.com/search/v1/attributes/medication-a/?locale=en-US \
  -H "Content-Type: application/json" \
  -H "x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt"

Where x-api-key is the private key provided when provisioning an account. The example key above is for demonstration purposes.

Example JSON Response

{
  "name": "Medication A",
  "generic": "generic a",
  "dose": [
    {
      "package": false,
      "label": "10 mg",
      "value": "00000000001",
      "baseValue": "1",
      "unitLabel": "tab(s)",
      "quantity": [
        {
          "label": "30 tab(s)",
          "value": "30"
        },
        ...
      ],
      "defaultQuantity": "30"
    },
    ...
  ],
  "defaultDose": "00000000001",
  "slug": "medication-a",
}

Example JSON Response for Missing or Incorrect Request Data

{
  "id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
  "message": "Incorrect or missing required parameters.",
  "statusCode": 400,
  "errorCode": "SLUG_INCORRECT_OR_MISSING"
}

Error Codes

Error CodeDescription
SLUG_INCORRECT_OR_MISSINGHTTP GET parameter slug is either missing or invalid.
LOCALE_INCORRECT_OR_MISSINGHTTP GET parameter locale is invalid.