Errors
A stable machine code, a human message, and a request id worth quoting.
Every error carries a stable code you can branch on, a message written for a human reading a log, and a requestId. The message text may change; the code will not.
422 Unprocessable Entity
{ "error": { "code": "rate_no_longer_available", "message": "The supplier withdrew this rate between search and booking.", "requestId": "req_01JQ8YC7T1V4", "supplierId": "sup_alpha", "retryable": false, "details": { "rateId": "rt_01JQ8Y3M9F", "suggestedAction": "re_search" } }}| Status | Code | What it means |
|---|---|---|
| 400 | invalid_request | The body failed validation. details names the fields. |
| 401 | invalid_token | Token missing, malformed or expired. Get a new one. |
| 403 | insufficient_scope | The token is valid but not authorised for this call. |
| 404 | not_found | The resource does not exist for this tenant. |
| 409 | booking_conflict | A conflicting operation is in flight for this booking. |
| 422 | rate_no_longer_available | The supplier withdrew the rate. Re-search. |
| 422 | price_changed | The supplier repriced. The new price is in details. |
| 422 | idempotency_key_reuse | The key was used with a different body. |
| 429 | rate_limited | Too many requests. Retry-After tells you when. |
| 502 | supplier_error | The supplier returned an error we could not interpret. |
| 504 | supplier_timeout | The supplier missed its budget. On writes, treat as unknown and retry with the same key. |
Note:
supplier_timeout on a write is the one error you must not treat as a failure. The reservation may exist. Retry with the same idempotency key, and if that still does not resolve, query by your clientReference.