The API allows the POS to send and receive information about bookings. Currently the API supports creating walk-in bookings, updating and retrieving existing bookings in the POS or the booking system.
Booking API (1.0)
Request
This endpoint is used to notify Tyro Connect about a new walk-in booking and will create a booking in the App system.
The id that is returned as a part of the response should be used to identify the booking for subsequent events or retrieving the details via the GET endpoint or during updates via the PATCH endpoint
Specifies which version of the API to use. If no value is provided then 0.1 version will be used
Contains asset information of the booking
The date and time the booking starts at the venue. The format of the date time is the notation as defined by RFC 3339, section 5.6
- Productionhttps://api.tyro.com/connect/bookings
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.tyro.com/connect/bookings \
-H 'Accept: application/vnd.tyro.connect+json;version=1.0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "merchant:abc123",
"asset": {
"type": "TABLE",
"tableStatus": "SEATED",
"tables": [
{
"number": "1"
}
]
},
"bookingStatus": "CREATED",
"numberOfPeople": 2,
"startTime": "2021-01-01T17:00:00Z"
}'Created
The id of the booking in the Tyro Connect system
The date and time the booking starts at the venue. The format of the date time is the notation as defined by RFC 3339, section 5.6
{ "id": "2688fcf2-44dd-4c72-88ac-79d0910f2983", "locationId": "merchant:abc123", "asset": { "type": "TABLE", "tableStatus": "SEATED", "tables": [ … ] }, "bookingStatus": "CREATED", "numberOfPeople": 2, "startTime": "2021-01-01T17:00:00Z" }
Request
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 Tyro Connect Location Id of the bookings to be retrieved. This parameter is required.
Returns results for matching asset.type values
Returns results based on the table.number of a booking.
Can be a single string or multi string value.
Returns results based on the status of a booking.
Can be a single string or multi string value.
Returns results that have a "startTime" later than or equal to the provided value.
Format: YYYY-MM-DD
Returns results that have a "startTime" before than or equal to the provided value.
Format: YYYY-MM-DD
Determines which booking date information to filter on when searching by date.
Specifies the amount of results to be retrieved.
A maximum of 50 results are returned if this value is not provided.
Specify the page to retrieve.
You will need to use this setting if you wish to retrieve specific pages.
Page-numbering is based on the value of "limit". If limit=5, then page=1 will display the hits from 1 to 5, page=3 will display the hits from 11 to 15.
Page numbers start at 1.
A request for a non-existing page will yield 0 results.
- Productionhttps://api.tyro.com/connect/bookings
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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>'The booking list
The results for the location that satisfy the filtering criteria
The id of the booking in the Tyro Connect system
Information relevant to the booking partner that this booking was created with
The status of the booking within the Booking system
The date and time the booking starts at the venue. The format of the date time is the notation as defined by RFC 3339, section 5.6
The date and time the booking ends at the venue. The format of the date time is the notation as defined by RFC 3339, section 5.6
The reason the booking was rejected or cancelled. Provided only when bookingStatus is REJECTED, CANCELLED_BY_MERCHANT or CANCELLED_BY_CUSTOMER
The timestamp when the Booking was created
- bookingStatus=ACCEPTED&fromDate=2021-05-04&toDate=2021-05-04
- tableNumber=10&tableNumer=22
- assetType=ROOM
{ "pagination": { "page": 1, "size": 2, "limit": 10, "total": 2 }, "results": [ { … }, { … } ] }
- Productionhttps://api.tyro.com/connect/bookings/{bookingId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.tyro.com/connect/bookings/{bookingId}' \
-H 'Accept: application/vnd.tyro.connect+json;version=1.0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'The booking response
The id of the booking in the Tyro Connect system
The status of the booking within the Booking system
The date and time the booking starts at the venue. The format of the date time is the notation as defined by RFC 3339, section 5.6
The date and time the booking ends at the venue. The format of the date time is the notation as defined by RFC 3339, section 5.6
The reason the booking was rejected or cancelled. Provided only when bookingStatus is REJECTED, CANCELLED_BY_MERCHANT or CANCELLED_BY_CUSTOMER
{ "id": "2688fcf2-44dd-4c72-88ac-79d0910f2983", "locationId": "merchant:abc123", "origin": { "bookingReference": "some-booking-reference" }, "customer": { "id": "85GFA95D", "name": "Jennifer Wicks", "notes": "Birthday breakfast" }, "startTime": "2020-12-01T08:00:00+10:00", "endTime": "2020-12-01T10:00:00+10:00", "bookingStatus": "ACCEPTED", "numberOfPeople": 2, "payments": [ { … } ], "asset": { "type": "TABLE", "tableStatus": "SEATED", "tables": [ … ], "discounts": [ … ], "preOrders": [ … ] }, "createdAt": "2021-05-04T08:00:00+10:00", "updatedAt": "2021-05-04T10:00:00+10:00" }
Specifies which version of the API to use. If no value is provided then 0.1 version will be used
The status of the booking within the Booking system
- Productionhttps://api.tyro.com/connect/bookings/{bookingId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- Update table status
- Update Booking details
- Cancel a booking
curl -i -X PATCH \
'https://api.tyro.com/connect/bookings/{bookingId}' \
-H 'Accept: application/vnd.tyro.connect+json;version=1.0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/merge-patch+json' \
-d '{
"asset": {
"tableStatus": "FINALISED"
}
}'- Productionhttps://api.tyro.com/connect/bookings/{bookingId}/events
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.tyro.com/connect/bookings/{bookingId}/events' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Events for a booking
- Events for a walk-in booking
{
"events": [
{
"id": "a17a35ee-e275-4eac-9a8d-7c58c1dbab68",
"locationId": "test-cafe",
"type": "BOOKING_FINALISED",
"sourceOfChange": "POS",
"eventData": {
"asset": {
"tableStatus": "FINALISED"
}
},
"outcome": {
"asset": {
"type": "TABLE",
"tables": [
{
"number": "88B"
}
],
"tableStatus": "FINALISED"
},
"customer": {
"name": "jerry seinfeld",
"email": "jerry@seinfeld.com"
},
"startTime": "2018-05-02T17:30:00.000Z",
"numberOfPeople": 3
},
"createdAt": "2021-04-21T05:52:17.222Z"
},
{
"id": "a17a35ee-e275-4eac-9a8d-7c58c1dbab68",
"locationId": "test-cafe",
"type": "BOOKING_CLOSING",
"sourceOfChange": "POS",
"eventData": {
"asset": {
"tableStatus": "CLOSING"
}
},
"outcome": {
"asset": {
"type": "TABLE",
"tables": [
{
"number": "88B"
}
],
"tableStatus": "CLOSING"
},
"customer": {
"name": "jerry seinfeld",
"email": "jerry@seinfeld.com"
},
"startTime": "2018-05-02T17:30:00.000Z",
"numberOfPeople": 3
},
"createdAt": "2021-04-21T05:52:13.339Z"
},
{
"id": "a17a35ee-e275-4eac-9a8d-7c58c1dbab68",
"locationId": "test-cafe",
"type": "BOOKING_DINING",
"sourceOfChange": "POS",
"eventData": {
"asset": {
"tableStatus": "DINING"
}
},
"outcome": {
"asset": {
"type": "TABLE",
"tables": [
{
"number": "88B"
}
],
"tableStatus": "DINING"
},
"customer": {
"name": "jerry seinfeld",
"email": "jerry@seinfeld.com"
},
"startTime": "2018-05-02T17:30:00.000Z",
"numberOfPeople": 3
},
"createdAt": "2021-04-21T05:52:08.322Z"
},
{
"id": "a17a35ee-e275-4eac-9a8d-7c58c1dbab68",
"locationId": "test-cafe",
"type": "BOOKING_CREATED",
"sourceOfChange": "APP",
"eventData": {
"asset": {
"tables": [
{
"number": "88B"
}
]
},
"customer": {
"name": "jerry seinfeld",
"email": "jerry@seinfeld.com"
},
"startTime": "2018-05-02T17:30:00.000Z",
"numberOfPeople": 3
},
"outcome": {
"asset": {
"tables": [
{
"number": "88B"
}
]
},
"customer": {
"name": "jerry seinfeld",
"email": "jerry@seinfeld.com"
},
"startTime": "2018-05-02T17:30:00.000Z",
"numberOfPeople": 3
},
"createdAt": "2021-04-21T05:51:41.944Z"
}
]
}