Fetch Drugs Linked to a Condition via Indications

Endpoint Overview

This API endpoint retrieves detailed information about drugs linked to a specific condition through indications. The data is formatted according to the FHIR standard and includes comprehensive pharmacological details, chemical structure, interactions, and more.

HTTP Request

GET https://www.britelink.io/api/v1/conditions/{conditionId}/indications/drugs

Required Headers

HeaderDescription
AuthorizationBearer BRITE_API_KEY.

URL Parameters

ParameterDescription
conditionIdUnique identifier of the condition. Required.

Response Structure

The response is a JSON array of objects. Each object represents a drug and includes:

FieldDescription
idUnique identifier of the drug.
tradeNameTrade name of the drug.
genericNameGeneric name of the drug.
simpleDescriptionBrief description of the drug.
Additional fieldsIncluding pharmacology, interactions, and more.

Example Response

[
  {
    "drug": {
      "id": "clqjl06p4000449l7qe6kop1g",
      "tradeName": "Tylenol",
      "genericName": "Acetaminophen",
      "simpleDescription": "Tylenol, containing acetaminophen..."
      // Additional fields...
    }
  }
  // Additional drugs...
]

Error Handling

Status CodeDescription
200Request successful.
400Bad request, often due to missing parameters.
404No drugs found for the specified condition ID.
500Internal server error.

Use Cases

  • Clinical decision support for selecting appropriate drug options.
  • Providing healthcare professionals with detailed drug information.
  • Integration of drug data into healthcare and pharmaceutical applications.

Sample JavaScript Fetch Request

fetch(
  "https://www.britelink.io/api/v1/conditions/{conditionId}/indications/drugs",
  {
    method: "GET",
    headers: {
            Authorization: `Bearer ${apiKey}`,,
    },
  }
)
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.error("Error:", error));

Security and Authentication

A valid API key is required for authentication, passed in the Authorization header. Ensure secure handling and storage of your API key.