API Usage Documentation

 

[CONFIDENTIAL]

Step A: Drug Name Autocomplete

Endpoint: https://app.usarx.com/api/v2/drug-search/?term=<drug_name> Parameters:

  • <drug_name> partial characters of the drug name for auto completion e.g. xana

Example Request:

GET https://app.usarx.com/api/v2/drug-search/?term=xana

{

"status": "success",

"message": "Drugs autocomplete (ES)", "data": [

{

"value": "xanax",

"text": "Xanax (Alprazolam)"

},

{

"value": "xanax-xr",

"text": "Xanax Xr (Alprazolam Er)"

},

{

"value": "xalatan",

"text": "Xalatan (Latanoprost)"

},

{

"value": "xadago",

"text": "Xadago"

},

{

"value": "xanthan-gum", "text": "Xanthan Gum"

}

]

}

 
   

Example Response:

 

Response Explanation:

  • data.value– URL friendly name of the drug – this will need to be fed to the “Step B” to API to fetch the dosages, forms, strengths and contents of the drug. (This acts as a slug for the drug page)
  • data.text – name of the drug (with brand and generic resolved) – this will show during the auto complete

Integration Notes:

The value/slug will be fed to the next step of the API (when user clicks) on the drug name. The name will be shown to the user in the auto complete list as the user types.

pg. 2

 

Endpoint A: https://app.usarx.com/api/v2/drug/info/<slug>

Endpoint B: https://app.usarx.com/api/v2/drug/info/<slug>?key=DRUGS_CONTENT_API_KEY

You may use “Endpoint A” by default. However, if an API KEY is added as a GET param to the endpoint (?key=API_KEY) then you’ll receive more information and content for the drug such as drug information, side effects content etc.

Parameters:

  • <slug> - the URL friendly name (slug) of the drug obtained from endpoint in STEP A.
  • key – (optional) the API KEY to unlock drugs content.

Example Request:

GET https://app.usarx.com/api/v2/drug/info/xanax

Example Response:

{

"status": "success", "drugContentAccess": false,

"message": "Dosages, forms and most common form for XANAX", "data": {

"name": "Xanax",

"slug": "xanax", "brandOrGeneric": "brand", "brand": {

"name": "xanax (brand)", "formAndDosages": [

{

"form": "Tabs", "pricingUrlKey": "…",

"imageUrl": "https://app.usarx.com/drugs/usarx-52959032230-75d485c0cbc942e790c607af1f9d2425.png", "strength": "0.25 mg"

},

{

"form": "Tabs", "pricingUrlKey": "…",

"imageUrl": "https://app.usarx.com/drugs/usarx-9005501-62a2e5720a4640a69b141bf95ecb7947.png", "strength": "0.5 mg"

},

{

"form": "Tabs", "pricingUrlKey": "…==",

"imageUrl": "https://app.usarx.com/drugs/usarx-9009001-4b8c59a1b646482aa36676357d3a87e0.png", "strength": "1 mg"

},

{

"form": "Tabs", "pricingUrlKey": "…==",

"imageUrl": "https://app.usarx.com/drugs/usarx-9009401-f30f52dbce754c249368b6231cb9c4e2.png", "strength": "2 mg"

}

],

"mostCommonPricingKey": "…",

"mostCommonImageUrl": "https://app.usarx.com/drugs/usarx-9005501-62a2e5720a4640a69b141bf95ecb7947.png", "averageSavings": false,

"maxSavings": false

pg. 3

 

[CONFIDENTIAL]

},

"generic": {

"name": "alprazolam (generic)", "formAndDosages": [

{

"form": "Powd", "pricingUrlKey": "…=",

"imageUrl": "https://www.usarx.com/static/images/og-usarx.png", "strength": "0 GM"

},

{

"form": "Tabs", "pricingUrlKey": "…=",

"imageUrl": "https://app.usarx.com/drugs/usarx-228202710-bc20e2629a4f459b9269e4e2b4d2cad6.png", "strength": "0.25 mg"

},

{

"form": "Tabs", "pricingUrlKey": "…==",

"imageUrl": "https://app.usarx.com/drugs/usarx-228202910-150f9b9e17ae4e97b9f8121ef950c57d.png", "strength": "0.5 mg"

},

{

"form": "Tabs", "pricingUrlKey": "…=",

"imageUrl": "https://app.usarx.com/drugs/usarx-228203110-6ed70cc9559f45f8babb5c303d03e491.png", "strength": "1 mg"

},

{

"form": "Tabs", "pricingUrlKey": "…=",

"imageUrl": "https://app.usarx.com/drugs/usarx-228203910-2657fd378c7c40309b156e38d1dc9020.png", "strength": "2 mg"

}

],

"mostCommonPricingKey": "…=",

"mostCommonImageUrl": "https://app.usarx.com/drugs/usarx-228203110-6ed70cc9559f45f8babb5c303d03e491.png", "averageSavings": "51.72%",

"maxSavings": "90.47%"

},

"medicare": {

"showMedicare": true, "medicareData": {

"drugSupportsMedicare": "Y",

"notes": "95% of Medicare Part D and Medicare Advantage plans cover this drug.", "deductible": "$2 – $391",

"typical": "FREE – $362", "donutHole": "FREE – $233", "outDonutHole": "$3 – $213", "savingTips": "Y"

}

}

}

}

pg. 4

 

[CONFIDENTIAL]

Note: The response content has been truncated for simplicity of this guide. Please see full example responseat https://app.usarx.com/api/v2/drug/info/xanax

Response Explanation:

  • data.name – title of the drug on the page
  • data.brand – branded drug details
  • data.generic – generic or generic equivalent of the branded drug

The following drugContent data will only be visible when using a valid KEY param in the get request.

  • data.drugContent.hasRichContent – true/false (true, when drug has HTML info and side effect details).
  • data.drugContent.info – HTML info for the drug (please see example response)
  • data.drugContent.sideEffects – HTML for the side effects page

Important: Show latest news for the drugs

As outlined in the “terms and conditions” you must display the blog posts and latest news for any searched drug using the data provided by this endpoint (Step B).

When using a partner KEY you’ll also receive data.latestNews which contains the blog links for the recent news regarding the drug that is queried. The same response from the latestNews looks as below:

"latestNews": {

"showNews": true, "newsData": [

{

"title": "Ativan vs Xanax: What's the difference?", "description": "…",

"url": "https://www.usarx.com/blog/ativan-vs-xanax-whats-the-difference", "image": "https://www.usarx.com/static/sitefiles/blog/Amlodipine_16.png"

},

{

"title": "How Long Does Xanax Last?", "description": "...",

"url": "https://www.usarx.com/blog/how-long-does-xanax-last", "image": "https://www.usarx.com/static/sitefiles/blog/xanax.png"

},

{

"title": "BuSpar Side Effects: What Are They?", "description": "…",

"url": "https://www.usarx.com/blog/buspar-side-effects-what-are-they", "image": "https://www.usarx.com/static/sitefiles/blog/a10.png"

},

{

"title": "BuSpar: What is it? Uses, Costs, Benefits, and Doses", "description": "…",

"url": "https://www.usarx.com/blog/buspar-what-is-it-uses-costs-benefits-and-doses", "image": "https://www.usarx.com/static/sitefiles/blog/buspar.png"

},

{

"title": "Ativan: What is it? Uses, Costs, Benefits, Doses", "description": "…",

"url": "https://www.usarx.com/blog/ativan-what-is-it-uses-costs-benefits-doses", "image": "https://www.usarx.com/static/sitefiles/blog/ativan.png"

},

{

 
   

 

pg. 5

 

[CONFIDENTIAL]

"title": "Small Businesses Should Consider USA Rx To Help Their Employees Save On Prescriptions", "description": "…",

"url": "https://www.usarx.com/blog/small-businesses-should-consider-usa-rx-to-help-their-employees-save-

on-prescriptions",

"image": null

}

]

},

 

You can either use simple text and links to display the recent latest news or you may decorate them using images. Both examples are below:

Text Representation:

Text representation can be simple HTTP (ahref) links to the USARx blog pages as shown below. You may decorate this in any way you prefer.

  • Ativan vs Xanax: What's the difference?
  • How Long Does Xanax Last?
  • BuSpar Side Effects: What Are They?
  • BuSpar: What is it? Uses, Costs, Benefits, and Doses
  • Ativan: What is it? Uses, Costs, Benefits, Doses

Graphical Representation:

The image and text should link to the blog URL and you’re free to decorate this in any way or number of columns but following in an example: