Errors

What a failed request returns and how to read it
View as Markdown

When a request fails, the API returns an error object with an HTTP status and a code you can act on. Read the code and title to see what went wrong, and keep the correlationId if you need to raise it with support.

The shape of an error

1{
2 "status": 422,
3 "error": "Unprocessable Entity",
4 "code": "878",
5 "title": "Missing/incorrect document type",
6 "detail": "No identType found for document type code CC",
7 "correlationId": "88f48120-952c-4ebe-b889-809c129932ea"
8}
FieldWhat it is
statusThe HTTP status code.
errorThe HTTP status text.
codeThe API error code. Match on this in your integration.
titleWhat went wrong, in plain words.
detailExtra detail for debugging, when present.
correlationIdA trace ID. Give this to support to look up the request.

Common codes

These are some of the codes you are most likely to hit. The full list runs to well over a hundred.

CodeMeans
6Service closed for sales
7Route code invalid
9Requested service is fully booked
15Invalid date
16Service has been cancelled
19Name is missing or incomplete
20Number of passengers invalid
1000Missing request token
1001Missing parameter
1010Agency not found
1020Route not found
3001Booking not found
3004An infant cannot travel without an accompanying adult
5001Unknown purchase id
878Missing or incorrect document type

Handling errors well

  • Match on code, not on title. The wording can change; the code does not.
  • Log the correlationId with every failed call. It is the fastest way for support to find the request.
  • A dynamic-fare error usually means the price moved. Run a fresh search and book against the new result.

For the complete list of codes and their meanings, see the GO7 error-response page.