By Region
Medication Prices by Region
Inside Rx provides an endpoint that will return pharmacy chains found in a given region. This is ideal in situations where the client wants to compare prices across different chains rather than individual pharmacies in a given region. The prices should be a close estimate of the prices at the chain’s pharmacies, but is not guaranteed to be the actual price for each chain location within the region.
Note
A “region” used in this documentation is a geographical area containing the zip code. This includes the radius around the given zip code’s center point but may also include other zip codes nearby. The distance is determined by the density of pharmacies in the area.
An X-API-KEY is used with the pricing endpoint to automatically configure metadata for the request. This ensures that prices are associated with the correct group for the provisioned account.
Pricing is different for people and pets. Make sure to price at the correct endpoint.
Usual and Customary vs. Discounted Price
The pricing API will return both the usual and customary price, as well as the discounted price. Client logic may need to show the lower price depending on the plan configured on the account.
Default National Chain Prices
Medication Prices by Region endpoint will return default national chain prices for a given NDC and quantity if zip code is not provided as part of the request or if we don’t find prices for the given zipcode.
People Pricing by Chains
This endpoint will fetch prices for people only. An account must be enabled with this endpoint to resolve pricing.
HTTP Request
POST https://services.insiderx.com/pricing/v1/region/people HTTP/1.1
Content-Type: application/json
x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCtHTTP Query Params
| param | Description |
|---|---|
accessCode | string (optional) Used to associate a card request with a co-brand for the provisioned account. |
limit | string (optional) Limits number of retail pharmacies returned to [1...10], defaults to 10. |
index | string (optional) Starting index position of records returned for pagination, defaults to 0. |
HTTP POST Params
The following params are sent as JSON in the request body. Dot notation is used to represent nested objects. Square bracket notation represents items that are nested within an array.
| param | Description |
|---|---|
ndc | string NDC11 of medication to price. |
quantity | float Metric quantity to price. |
zip | string (optional) Five digit zip code used to specify the region to price in. |
daysSupply | number (optional) Days supply to price. Does not always impact prices for all clients. |
Response Types
| Code | Description |
|---|---|
| 200 | Priced successfully. Results returned. |
| 400 | Incorrect or missing required parameters. |
| 403 | Lack of permissions to price. |
| 404 | NDC or Quantity not found, or not covered. |
| 500 | Internal server error, something went wrong. |
Response Attributes
The following attributes are returned as an object within the response body. Dot notation is used to represent nested objects. Square bracket notation represents items that are nested within an array.
| Attribute | Description |
|---|---|
id | string Internal ID used for tracking purposes. |
pharmacies[] | array Array of Chain Pricing Objects containing data for each chain priced. |
pagination | object Pagination Object containing information for pagination of the pricing results. |
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. |
metadata | object (optional) Metadata attributes that provides additional context about the response. |
Example CURL Request
curl https://services.insiderx.com/pricing/v1/region/people \
-H "Content-Type: application/json" \
-H "x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt" \
-d ndc="12345678901" \
-d quantity=30.0 \
-d zip="78758"Where x-api-key is the private key provided when provisioning an account. The example key above is for demonstration purposes.
Example JSON Response
{
"id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
"metadata": {
"cache": true
},
"pharmacies": [
{
"type": "chain",
"name": "WALGREENS",
"code": "58765431",
"price": {
"unc": "48.15",
"discounted": "33.17"
},
"count": 8,
"featured": true,
"score": 3
},
...
],
"pagination": {
"size": 50,
"index": 0,
"limit": 10
}
}Example JSON Response for Missing or Incorrect Request Data
{
"id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
"message": "Incorrect or missing required parameters.",
"statusCode": 400,
"errorCode": "NDC_INCORRECT_OR_MISSING"
}Pets Pricing by Chain
This endpoint will fetch prices for pets only. An account must be enabled with this endpoint to resolve pricing.
HTTP Request
POST https://services.insiderx.com/pricing/v1/region/pets HTTP/1.1
Content-Type: application/json
x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCtHTTP Query Params
| param | Description |
|---|---|
accessCode | string (optional) Used to associate a card request with a co-brand for the provisioned account. |
limit | string (optional) Limits number of retail pharmacies returned to [1...10], defaults to 10 |
index | string (optional) Starting index position of records returned for pagination, defaults to 0 |
HTTP POST Params
The following params are sent as JSON in the request body. Dot notation is used to represent nested objects. Square bracket notation represents items that are nested within an array.
| param | Description |
|---|---|
ndc | string NDC11 of medication to price. |
quantity | float Metric quantity to price. |
zip | string (optional) Five digit zip code used to specify the region to price in. |
daysSupply | number (optional) Days supply to price. Does not always impact prices for all clients. |
Response Types
| Code | Description |
|---|---|
| 200 | Priced successfully. Results returned. |
| 400 | Incorrect or missing required parameters. |
| 403 | Lack of permissions to price. |
| 404 | NDC or Quantity not found, or not covered. |
| 500 | Internal server error, something went wrong. |
Response Attributes
The following attributes are returned as an object within the response body. Dot notation is used to represent nested objects. Square bracket notation represents items that are nested within an array.
| Attribute | Description |
|---|---|
id | string Internal ID used for tracking purposes. |
pharmacies[] | array Array of Chain Pricing Objects containing data for each chain priced. |
pagination | object Pagination Object containing information for pagination of the pricing results. |
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. |
metadata | object (optional) Metadata attributes that provides additional context about the response. |
Example CURL Request
curl https://services.insiderx.com/pricing/v1/region/pets \
-H "Content-Type: application/json" \
-H "x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt" \
-d ndc="12345678901" \
-d quantity=30.0 \
-d zip="78758"Where x-api-key is the private key provided when provisioning an account. The example key above is for demonstration purposes.
Example JSON Response
{
"id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
"metadata": {
"cache": true
},
"pharmacies": [
{
"type": "chain",
"name": "HEB",
"code": "96365431",
"price": {
"unc": "58.15",
"discounted": "32.17"
},
"count": 19,
"featured": false,
"score": 11
},
...
],
"pagination": {
"size": 4,
"index": 0,
"limit": 4
}
}Example JSON Response for Missing or Incorrect Request Data
{
"id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
"message": "Incorrect or missing required parameters.",
"statusCode": 400,
"errorCode": "NDC_INCORRECT_OR_MISSING"
}Pharmacy Types
The following pharmacy types can be returned during a pricing request.
| Code | Description |
|---|---|
chain | Chain A pharmacy chain, with a price for that chain for the metric quantity given. |
Response Attribute Objects
Chain Pricing Object
A pharmacy chain, with the price for that chain for the quantity/drug given.
| Attribute | Description |
|---|---|
pharmacies[].type | string Identifier for the type of pharmacy priced at. See pharmacy types. |
pharmacies[].name | string Display name of pharmacy chain. |
pharmacies[].code | string Unique pharmacy chain identifier. |
pharmacies[].price.discounted | string Discounted price. |
pharmacies[].price.unc | string/null Usual and customary (UNC). UNC price will be returned when available. |
pharmacies[].count | integer Number of pharmacies found under a chain in a given region. This value will be null for default national chain prices. |
pharmacies[].score | integer Pharmacies popularity ranking assigned by Inside Rx. This value will be null for default national chain prices. |
pharmacies[].featured | boolean True indicates NDC provided is a Featured Brand medication and additional restrictions apply. NOTE - Only applicable for people pricing and if the contract includes Featured Brand medications. |
Pagination Object
Pagination object to specify the details of the pharmacy chains found.
| Attribute | Description |
|---|---|
pagination.size | integer Total number of chains found in the given zip code’s region. |
pagination.index | integer Starting index position of records returned out of total records. |
pagination.limit | integer Maximum number of records returned per response. |
Error Codes
| Error Code | Description |
|---|---|
ZIP_INCORRECT_OR_MISSING | HTTP POST parameter zip is invalid. |
NDC_INCORRECT_OR_MISSING | Required HTTP POST parameter ndc is either missing or invalid. |
QUANTITY_INCORRECT_OR_MISSING | Required HTTP POST parameter quantity is either missing or invalid. |
INDEX_INCORRECT_OR_MISSING | HTTP Query parameter index is invalid. |
LIMIT_INCORRECT_OR_MISSING | HTTP Query parameter limit is invalid. |