Get Conditions
Overview
This API endpoint facilitates the searching of medical conditions. It allows for precise or broad matching of condition names, and now includes enhanced features for more flexible data retrieval and detailed information.
HTTP Request Details
- Endpoint:
GET https://www.britelink.io/api/v1/conditions
Required Headers
Header | Description |
---|---|
Authorization | Your API key. |
Query Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
q | String | No | - | Text used to search conditions by name. Optional. |
fuzzy | Boolean | No | false | Enables fuzzy search for approximate matches. |
exact | Boolean | No | false | Only includes exact matches to the query. |
r | Boolean | No | false | Include referenced drugs and indications if true . |
cursor | String | No | - | Cursor for pagination control. |
Note: The exact
parameter cannot be used in conjunction with fuzzy
. Doing so will result in a 400 Bad Request
error. The r
parameter, when set to true
, enriches the response with detailed related information.
Pagination Support
- This endpoint now supports cursor-based pagination, which is beneficial for handling extensive datasets. Default batch size is 10 conditions.
Example Usage
- CURL Request:
curl -L 'https://www.britelink.io/api/v1/conditions?q=Diabetes&r=true' \ -H 'Authorization: Bearer myapikey'
Response Format
-
Response Structure: The response is in JSON format, comprising an array of objects. Each object represents a condition and contains the following fields:
Field Type Description id
Array Id of the condition. name
String Name of the condition. severity
String Severity degree of the condition. status
String Condition status. drugId
String Id of the indicated drug for the condition. indications
Array Array of related indications (if r
is true).drug
Object Detailed drug information (if r
is true). -
Sample Response:
[ { "id": "clqklnm4u001j49c9h2a0u05i", "name": "Mild to Moderate Pain, Fever", "severity": "All severities for pain and fever, as recommended", "status": "Active pain or fever", "stage": "Not specifically applicable", "drugId": "clqjl06p4000449l7qe6kop1g" // Additional fields if 'r' is true } ]
Error Handling
-
Common HTTP Status Codes:
Status Code Meaning 400 Bad Request – Parameter errors. 401 Unauthorized – API key issues. 404 Not Found – No matching conditions. 500 Internal Server Error.
Security and Compliance
- API key must be transmitted securely.
- Adheres to standard protocols for medical data privacy and security.
Notes for Developers
- Ideal for user interfaces requiring quick search and retrieval of medical conditions.
- Enhanced with flexible query parameters (
q
,r
,cursor
) for broad or specific searches and detailed data retrieval. - Supports pagination for efficient handling of large data sets.