Skip to content
Medication Search
Alternatives

Alternatives

Medication Alternatives

Inside Rx provides an endpoint that will return similar medications for a given medication. This is ideal in situations where brand and generic versions of a medication is needed.

The Medication Alternatives 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.

HTTP Request

GET https://services.insiderx.com/search/v1/alternatives/?slug=: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 the unique identification that represents a medication name.

HTTP GET Params

paramDescription
slugstring (required) Unique medication identifier.

Response Types

CodeDescription
200Successful results returned.
400Incorrect or missing required parameters.
403Lack of permissions to use medication search service.
404No medication matched slug.
500Internal server error, something went wrong.

Response Attributes

The following attributes are returned as a array of objects 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.
results[].slugstring Unique medication identifier.
results[].labelstring Generic or Brand name of the medication.
results[].genericboolean Flag that indicates if generic or not.
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/alternatives/?slug=prinivil \
  -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

{
  "id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
  "results": [
      {
        "label": "Lisinopril",
        "slug": "lisinopril",
        "generic": true
      },
      {
        "label": "Prinivil",
        "slug": "prinivil",
        "generic": false
      },
      {
        "label": "Zestril",
        "slug": "zestril",
        "generic": false
      }
  ]
}

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 invalid.