Errors
The API uses standard HTTP status codes and returns a consistent error body.
Error Response Format
{
"error": "NOT_FOUND",
"message": "errors.developer_api.patient_not_found"
}
| Field | Description |
|---|---|
error | Machine-readable error code |
message | i18n translation key |
HTTP Status Codes
| Code | Meaning |
|---|---|
200 | Success |
202 | Accepted (async operation queued) |
400 | Bad request — malformed body or missing required params |
401 | Unauthorized — invalid or missing credentials |
403 | Forbidden — valid credentials but insufficient scope |
404 | Not found |
422 | Validation error |
429 | Rate limit exceeded |
500 | Internal server error |
Common Error Codes
error | HTTP | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid Authorization header |
FORBIDDEN | 403 | API key lacks the required scope |
NOT_FOUND | 404 | Resource does not exist or belongs to another clinic |
VALIDATION | 422 | Invalid field value (details in message) |
INVALID_PARAMS | 400 | Missing required query parameters |
INTERNAL | 500 | Unexpected server error |