08 List bookings

View as Markdown
Lists your bookings, newest first. Only your own company's bookings are ever returned. | Parameter | Type | Default | Notes | | --- | --- | --- | --- | | `page` | integer | `1` | | | `limit` | integer | `25` | Maximum `100`. | | `query` | string | — | A **JSON-encoded object**, not a plain search term. Max 5000 characters. | ### The query parameter `query` must be JSON. Send it URL-encoded, for example `query={"text":"GAC-6A8C"}`. | Key | Type | Matches | | --- | --- | --- | | `text` | string | Booking reference, passenger PNR, passenger name, booker name, booker email, or flight number. Partial matches count. | | `airports` | array of ids | Bookings touching those airports. | | `services` | array of ids | Bookings containing those services. | | `booking_status` | array of strings | `quote`, `booking`, `cancelled`. | **If `query` is not valid JSON it is ignored silently** and you get everything back, which looks like a filter that matched broadly rather than one that failed. Check your encoding if the count looks wrong. There is **no date filter** of any kind, and no `updated_since`. Reconciling a period means paging the whole history newest-first until you pass the dates you care about. ### Response The paginated envelope. Note that `trace` is omitted entirely on this endpoint, unlike every other one. ```json "pagination": { "total_count": 7, "total_pages": 4, "current_page": 1, "limit": 2 } ``` Each row is a summary, not the full booking: `id`, `ref_no`, `status`, `grand_total`, `currency`, `booker`, `services[]`, `lead_passenger`, `bags`, `pax`. Fetch the full record with **09 Get booking by ID**. Two details that catch people. `bags` and `pax` come from the **first journey only**, so a multi-journey booking under-reports here. And `services[].id` in this response is a line-item id, not the service id you send when creating a quote; match on `service_name` instead. | Status | `error_code` | When | | --- | --- | --- | | `200` | — | Always, even with no matches. `message` is `Successful.` | | `422` | `validation_failed` | `limit` above 100, `page` below 1, or `query` over 5000 characters. | | `401` | `unauthenticated` | Bearer token missing, invalid or expired. | | `500` | `server_error` | Our fault. |

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

pageintegerOptional
Page number. Defaults to 1.
limitintegerOptional
Results per page. Defaults to 25, maximum 100.

Response

OK
messagestring
statusinteger
responseTimestring
datalist of objects
paginationobject