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: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCtWhere 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
| param | Description |
|---|---|
locale | string (optional) Localization of the medication attributes. Either en-US (default), or es-US |
Response Types
| Code | Description |
|---|---|
| 200 | Successful result returned. |
| 400 | Missing :slug in path. |
| 403 | Lack of permissions to use medication search service. |
| 404 | Invalid :slug |
| 500 | Internal 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.
| Attribute | Description |
|---|---|
id | string Internal ID used for tracking purposes. |
name | string Generic or Brand name of the medication. |
generic | string Generic name of the medication, can be a duplicate name attribute. |
dose[].package | boolean True if the medication is a package. |
dose[].label | string Display label for the dose. |
dose[].value | string Value refers to the NDC for this specific strength and form. |
dose[].baseValue | string Base Value used when calculating custom quantity to price. |
dose[].unitLabel | string Display label for the unit. |
dose[].quantity[].label | string Display label for the quantity. |
dose[].quantity[].value | string Value of the quantity. |
dose[].defaultQuantity | string Value of the most commonly prescribed quantity. |
dose[].program | boolean True if medication is covered in a special program that has additional restrictions. NOTE - Only applicable if your contract participates in that program. |
dose[].doseForm | string Form for the dose. |
defaultDose | string NDC of the most commonly prescribed dose. |
slug | string External ID that is unique and URL friendly. |
genericSlug | string The slug identifier of the generic version of this drug. It will be null if there is no generic version available. |
statusCode | integer (optional) HTTP status code in case of failure. |
message | string (optional) Error description. |
errorCode | string (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 Code | Description |
|---|---|
SLUG_INCORRECT_OR_MISSING | HTTP GET parameter slug is either missing or invalid. |
LOCALE_INCORRECT_OR_MISSING | HTTP GET parameter locale is invalid. |