v1
latestOpenAPI 3.0.02026-07-141046209.2 KBList all bookings
Returns a list of all the bookings you've made.
You can filter the list based on when bookings were created or last updated, as well as their arrival (start) and departure (end). These date-based filters allow to narrow down the result with modifiers for less than (lt), greater than (gt), lower than or equal to (lte), greater than or equal to (gte) and equal to (eq).
Example: Adding the query parameters start[gt]=2021-05-20&updated[lte]=2020-11-20T11:11:00.000Z would return bookings arriving after May 20th, 2020 that were updated before or on November 20th, 2020 at 11:11 am UTC.
You can specify the sorting order in which bookings are returned:
- This is done by using the sortBy query parameter.
- Results can be sorted by createdAt and updatedAt
- The parameter allows for a comma-separated list of arguments with :asc (ascending, the default if no sorting is specified) and :desc (descending) modifiers.
Query parameters
Allows for filtering based on arrival date of the booking in ISO 8601 format (e.g. 2021-12-01). Available modifiers include less than (lt), greater than (gt), lower than or equal to (lte), greater than or equal to (gte) and equal to (eq). Usage example: ?start[lte]=2021-12-20&start[gte]=2021-12-10
Allows for filtering based on departure date of the booking in ISO 8601 format (e.g. 2021-12-01). Available modifiers include less than (lt), greater than (gt), lower than or equal to (lte), greater than or equal to (gte) and equal to (eq). Usage example: ?end[lte]=2021-12-25&end[gte]=2021-12-15
Allows for filtering based on creation date and time of the booking in ISO 8601 format (e.g. 2020-11-04T17:37:37Z) and UTC timezone. Available modifiers include less than (lt), greater than (gt), lower than or equal to (lte), greater than or equal to (gte) and equal to (eq). Usage example: ?created[lte]=2020-11-04T19:37:37Z&created[gte]=2020-11-04T15:56:37.000Z
Allows for filtering based on the date and time the booking was last updated, in ISO 8601 format (e.g. 2020-11-04T17:37:37Z) and UTC timezone. Available modifiers include less than (lt), greater than (gt), lower than or equal to (lte), greater than or equal to (gte) and equal to (eq). Usage example: ?updated[lte]=2020-11-04T19:37:37Z&updated[gte]=2020-11-04T15:56:37.000Z
Pagination size. Defaults to 100 if omitted.
Pagination offset. Defaults to 0 if omitted.
Order in which the results should be sorted. Currently allows you to sort by createdAt and updatedAt. Specify multiple paramaters by separating with commas
Response
Returns a paginated list of bookings (filtered based on your query parameters).