Errors
The Partner API uses conventional HTTP response status codes to indicate the success or failure of an API request.
HTTP status codes
| Code | Status | Meaning |
|---|---|---|
200 | OK | Request succeeded. Response body contains the requested data. |
201 | Created | Resource successfully created. Response body contains the new resource. |
204 | No Content | Request succeeded with no response body (e.g. successful DELETE). |
400 | Bad Request | The request was malformed or missing required parameters. Check the error message for details. |
401 | Unauthorized | Authentication failed. Your access token is missing, expired, or invalid. |
403 | Forbidden | Your credentials are valid but you don't have permission to access this resource. |
404 | Not Found | The requested resource does not exist. Check the ID or path. |
409 | Conflict | The request conflicts with the current state (e.g. duplicate booking). |
422 | Unprocessable Entity | The request body is well-formed but contains semantic errors (e.g. invalid date format). |
429 | Too Many Requests | Rate limit exceeded. Back off and retry after the period indicated in the Retry-After header. |
500 | Internal Server Error | Something went wrong on our end. Retry the request or contact support. |
503 | Service Unavailable | The API is temporarily down for maintenance. Retry after a short delay. |
Error response format
All error responses return a consistent JSON structure:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The request body contains invalid fields.",
"details": [
{
"field": "currency",
"message": "Currency 'XYZ' is not a supported ISO 4217 currency code."
}
]
}
}
| Field | Type | Description |
|---|---|---|
error.code | string | Machine-readable error code for programmatic handling |
error.message | string | Human-readable summary of the error |
error.details | array | Optional. Field-level validation errors with specific messages |
Common error codes
| Code | Meaning |
|---|---|
VALIDATION_ERROR | One or more fields failed validation |
AUTHENTICATION_ERROR | Token is missing or invalid |
AUTHORIZATION_ERROR | Insufficient permissions |
NOT_FOUND | Resource does not exist |
RATE_LIMIT_EXCEEDED | Too many requests in the time window |
CONFLICT | Action conflicts with current resource state |
INTERNAL_ERROR | Unexpected server error |
Handling errors
- 4xx errors: Fix the request and retry. Don't retry without changes.
- 429 errors: Implement exponential backoff. Respect the
Retry-Afterheader. - 5xx errors: Retry with exponential backoff (1s, 2s, 4s, up to 30s max).