Response Structure
All API responses follow a consistent JSON structure with three top-level fields: data, status, and error_code. This standardized format makes it easy to handle responses programmatically.
Successful Response
When a request succeeds, the response includes the requested data in the data field:
data
Contains the actual response payload. Structure varies by endpoint but typically includes items array for list endpoints and pagination metadata.
status
Boolean indicating request success. true for successful requests, false for errors.
error_code
Numeric code indicating the result. 0 means success. Non-zero values indicate specific error conditions (see Error Handling guide).
Pagination
List endpoints return paginated results with metadata to help navigate through large datasets:
total— Total number of items across all pagespage— Current page number (1-indexed)size— Number of items per pageitems— Array of results for the current pageComplex Data Structures
Some endpoints return nested objects with multilingual fields and normalized identifiers:
Multilingual Fields
Fields like display_name contain arrays of translations with language codes:
"display_name": [{ "lang": "EN", "name": "..." }] Normalized IDs
Entities include both unique IDs (drug_id, target_id) and normalized IDs for grouping similar entities across different naming conventions.
Response Headers
Important metadata is included in response headers:
content-typeResponse formatapplication/jsonx-correlation-idRequest trackingx-openapi-amountAPI usagedateResponse timeserverServer infoBest Practices
- Always check
statusfield before processing data - Handle pagination properly for large result sets
- Use
x-correlation-idfor debugging and request tracing - Parse multilingual fields based on your application's locale