Dosage by ID Endpoint

Overview

The Dosage by ID endpoint allows users to retrieve detailed information about a specific dosage by providing its unique identifier (ID).

Endpoint

GET https://www.britelink.io/dosages/:id

Replace :id with the ID of the dosage you want to retrieve.

Making a Request

Example Request using cURL

curl -X GET "https://www.britelink.io/dosages/clrn5m01o0026ia08lou1bb1g"

Example Request using JavaScript

const dosageId = "clrn5m01o0026ia08lou1bb1g";
const apiUrl = `https://www.britelink.io/dosages/${dosageId}`;

fetch(apiUrl)
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.error("Error:", error));

Responses

  • HTTP 200: Success, returns detailed information about the dosage.
  • HTTP 404: No dosage found with the specified ID.
  • HTTP 500: Internal server error.

Response Format

Responses are structured as JSON, providing detailed information about the dosage.

{
  "drugName": "Aspirin",
  "dosage": {
    "form": "Tablet",
    "physicalForm": "Oral Tablet",
    "adminMethod": "Oral",
    "strength": "500mg",
    "id": "clrn5m01o0026ia08lou1bb1g"
  }
}

Use Cases

  • Dosage Verification: Healthcare professionals can verify dosage details before prescribing medications to patients.
  • Patient Education: Patients can access detailed information about their prescribed dosages to ensure proper medication adherence and understand potential side effects.
  • Research and Analysis: Researchers can analyze individual dosages to study drug formulations, dosing regimens, and their effects on patient outcomes.

Best Practices

  • Ensure that the dosage ID provided in the request is valid and corresponds to an existing dosage record.
  • Handle errors gracefully by providing informative error messages in the response for better usability and troubleshooting.