Fetch Allergy by ID

Endpoint Description

Retrieves detailed information about a specific allergy, including related drug details, by the allergy's unique identifier.

HTTP Method: GET

https://www.britelink.io/api/v1/allergies/{allergyId}

URL Parameters

  • allergyId (required): The unique identifier for the allergy.

Headers

  • Authorization: Bearer BRITE_API_KEY (required) - The API key for authentication.

Request Example

GET /api/v1/allergies/clqkksrze000d49c995nezd51
Authorization: Bearer BRITE_API_KEY

Successful Response

HTTP Status Code: 200 OK

Response Body Structure

{
  "resourceType": "Allergy",
  "id": "string",
  "description": "string",
  "crossSensitivity": "string",
  "sensitiveDrugs": "string",
  "incidenceRate": "string",
  "drug": {
    "id": "string",
    "tradeName": "string",
    "genericName": "string",
    "description": "string",
    "simpleDescription": "string",
    "clinicalDescription": "string",
    "strength": "string",
    "form": "string",
    "registrationNo": "string",
    "dateRegistered": "datetime",
    "applicantName": "string",
    "principalName": "string",
    "foodInteractions": "string",
    "levelOfAvailability": "string",
    "drugPriority": "string",
    "ispublished": "boolean",
    "createdAt": "datetime",
    "updatedAt": "datetime"
  }
}

Example Response

{
    "resourceType": "Allergy",
    "id": "clqkksrze000d49c995nezd51",
    "description": "Symptoms may include rash, swelling, itching, difficulty breathing, and severe dizziness. Anaphylaxis, a severe allergic reaction, is extremely rare.",
    "crossSensitivity": "minimal cross-sensitivity",
    "sensitiveDrugs": "caution is advised",
    "incidenceRate": "0.00",
    "drug": {
        "id": "clqjl06p4000449l7qe6kop1g",
        "tradeName": "Tylenol",
        "genericName": "Acetaminophen",
        ...
    }
}

Error Responses

  • HTTP Status Code: 400 Bad Request

    • Condition: Allergy ID is missing or invalid.
    • Response: "Allergy ID is required in the request URL"
  • HTTP Status Code: 404 Not Found

    • Condition: No allergy found for the given ID.
    • Response: "No allergy found with the provided ID"
  • HTTP Status Code: 500 Internal Server Error

    • Condition: An error occurred on the server while processing the request.
    • Response: "An error occurred while fetching the allergy"

Usage Notes

  • Ensure that the allergyId is valid and corresponds to an existing allergy record.
  • The Authorization header must contain a valid BRITE_API_KEY to access the endpoint.
  • This endpoint is intended for use by healthcare professionals and authorized personnel.