This endpoint returns all the bookings of a given location. The list of bookings is paginated and it is possible to apply filters to the bookings being fetched.
The filtering options use an "OR" clause within the same filter criteria and an "AND" clause between criteria.
This means that a request with bookingStatus=ACCEPTED&tableNumber=10
will return the bookings that were ACCEPTED
and that have table 10
associated.
A request with tableNumber=22&tableNumber=10
will return the bookings that have either table 22
or table 10
.
The paginated results are ordered using the sequence they were created in the Tyro Connect. For example results[0]
on page 1 is the first matching booking that was created in the Tyro Connect system.
Please Note: Results are not sorted by date. If you require the results to be sorted make sure you fetch all the pages before applying a sort to the list of records.
The booking list
When you don't have the right permissions to fetch the bookings for the provided location
When the provided locationId
does not exist in our system
curl -i -X GET \ 'https://api.tyro.com/connect/bookings?locationId=string&assetType=ROOM&tableNumber=outside-table-3&bookingStatus=CREATED&fromDate=2021-04-28&toDate=2021-04-28&dateType=CREATED&limit=10&page=2' \ -H 'Accept: application/vnd.tyro.connect+json;version=1.0' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "pagination": {
- "page": 1,
- "size": 2,
- "limit": 10,
- "total": 2
}, - "results": [
- {
- "id": "2688fcf2-44dd-4c72-88ac-79d0910f2983",
- "locationId": "merchant:abc123",
- "origin": {
- "bookingReference": "some-booking-reference"
}, - "customer": {
- "id": "85GFA95D",
- "name": "Jennifer Wicks",
- "notes": "Birthday breakfast"
}, - "startTime": "2021-05-04T08:00:00+10:00",
- "endTime": "2021-05-04T10:00:00+10:00",
- "bookingStatus": "ACCEPTED",
- "numberOfPeople": 2,
- "payments": [
- {
- "amount": 4321,
- "currency": "AUD",
- "description": "Reservation payment"
}
], - "asset": {
- "type": "TABLE",
- "tableStatus": "SEATED",
- "tables": [
- {
- "number": "1"
}
], - "discounts": [
- "Summer Sale 10% off"
], - "preOrders": [
- "1x breakfast roll",
- "4x flat whites"
]
}, - "createdAt": "2021-05-04T08:00:00+10:00",
- "updatedAt": "2021-05-04T10:00:00+10:00"
}, - {
- "id": "2688fcf2-44dd-4c72-88ac-79d0910f2983",
- "locationId": "merchant:abc123",
- "origin": {
- "bookingReference": "some-booking-reference"
}, - "customer": {
- "id": "85GFA95D",
- "name": "Jennifer Wicks",
- "notes": "Birthday breakfast"
}, - "startTime": "2021-05-04T09:00:00+10:00",
- "bookingStatus": "ACCEPTED",
- "numberOfPeople": 5,
- "asset": {
- "type": "TABLE",
- "tableStatus": "SEATED",
- "tables": [
- {
- "number": "10"
}, - {
- "number": "14"
}
]
}, - "createdAt": "2021-05-04T08:00:00+10:00",
- "updatedAt": "2021-05-04T10:00:00+10:00"
}
]
}