Response Format
Understanding API response structure and handling
All API endpoints follow a consistent response format to make integration easier and more predictable.
Response Structure
Every API response includes these standard fields:
Indicates if the request was successful. true
for successful requests, false
for failures.
Present only on successful requests (success: true
). Contains the actual response data.
Present only on failed requests (success: false
). Contains a human-readable error message.
Optional field present on failed requests. Contains additional error details or validation errors.
The HTTP status code of the response.
Success Response
A successful response always has success: true
and includes the response data in the data
field:
Error Response
Error responses always have success: false
and include an error message:
Validation Errors
When validation fails, the response includes detailed error information in the details
field:
Status Codes
The API uses standard HTTP status codes to indicate the success or failure of requests: