Errors
The API uses standard HTTP status codes. A 2xx status means the request was handled; any other status is an error, with a JSON body whose detail (or error) field describes the problem.
| Status | Meaning | What to do |
|---|---|---|
200 OK |
The request succeeded. Always read the body: a search can carry an errors list next to options when some sources didn't answer (see 3. FAQ - Search & Availability), and a book or cancel response can carry status: FAILED when the hotel rejected it. |
Act on the body, not only on the status code. |
400 Bad Request |
The request is invalid: a required parameter is empty, the check-in date is in the past, the check-out date isn't after the check-in date, or an identifier has the wrong format. | Correct the request. Don't resend it unchanged. |
401 Unauthorized |
Credentials are missing or invalid. | See Environments & Authorization. |
404 Not Found |
The option, confirmation or booking doesn't exist, has expired, or belongs to another account. | Search again, or check the identifier. |
409 Conflict |
The request conflicts with the current state: the price rose by more than your price_tolerance, a booking for the same stay is still pending, or you cancel a booking whose outcome is still pending (your request is recorded). |
Read the message. For a price change, search again or retry with a higher tolerance. See 4. FAQ - Quote & Booking. |
410 Gone |
The option is no longer available (sold out). | Search again. |
422 Unprocessable Entity |
A parameter has the wrong type or format, for example a date that isn't YYYY-MM-DD. |
The detail list names each invalid field. |
500 Internal Server Error |
An unexpected error on our side. | Retry searches and reads after a short wait. Don't retry a book request (see below). Contact support if it persists. |
502 Bad Gateway |
The hotel's reservation system returned an invalid response. | As for 500. |
503 Service Unavailable |
The service is temporarily unavailable. | Retry after a short wait, with increasing intervals. |
Confirm, book and cancel requests can also return other 4xx codes from the hotel's reservation system, for example when a booking is already cancelled; the detail field contains its message.
Retrying safely
- Searches, confirmations and all
GETrequests are safe to retry. Use increasing intervals and a small number of attempts. - Never retry a book request blindly after a timeout, a
500, a502or a503: the booking may have been made even though you received an error. Contact support@apixv.com with theconfirmation_uid; we check with the hotel and tell you whether the booking exists. - When you contact support about a request, include the
X-Search-IDresponse header of a search, or theconfirmation_uidorbooking_uid.
Example of a validation error, for check_in=01-03-2027:
{
"detail": [
{
"type": "date_from_datetime_parsing",
"loc": ["query", "check_in"],
"msg": "Input should be a valid date or datetime, invalid character in year",
"input": "01-03-2027"
}
]
}