Skip to content

Get Bookings
Alpha

Request

Get all bookings.

Security
OAuth2(Required scopes: booking.read)
Query
cursorstring

Pagination cursor for fetching the next page of results. Omit or pass an empty string to start from the beginning of the list.

limitinteger, (int32), [ 1 .. 100 ]

Maximum number of items to return per page. Defaults to 100, maximum 100.

Default:100
event_idstring

Filter bookings to a specific event. If provided, only bookings belonging to that event are returned.

fromstring, (date-time)

Filter bookings made after the provided timestamp.

tostring, (date-time)

Filter bookings made before the provided timestamp.

statusArray of strings, [ 1 .. 4 ] items, unique

Return only bookings with one of these statuses. Comma-separate several, e.g. status=MOVED,CANCELLED.

PROCESSING and UNKNOWN cannot be filtered on: the first is a transient checkout state and the second is a defensive default, so neither is a stable thing to select by.

sortstring

Field to define the sort order. To indicate sorting direction, fields may be prefixed with + (ascending) or - (descending).

Ensure to URL escape the value as + can otherwise be interpreted as a space.

Only fields created_at and updated_at are supported.

Default:"-created_at"
GET
/v1/bookings
curl -i -X GET \
  'https://api.understory.io/v1/bookings?cursor=string&limit=100&event_id=string&from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z&status=ACTIVE&sort=-created_at' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
nextstring

Cursor for the next page of results. An empty string or absent value indicates the end of the list.

itemsArray of objects(Booking)
Response
{ "next": "string", "items": [ {} ] }