Skip to content

Booking API (1.0)

The API allows the APP and POS to send and receive information about bookings. Currently the API supports creating, updating and retrieving bookings in the POS or the booking system.

Overview
Languages
Servers
Production
https://api.tyro.com/connect

Create Booking

Request

This endpoint is used to create a booking within Tyro Connect. This call will create a booking in the POS 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.

Security
JWT
Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
Acceptstring(acceptHeaderBooking1_0)required

Specifies which version of the API to use. If no value is provided then 0.1 version will be used

Default application/vnd.tyro.connect+json;version=0.1
Enum"application/vnd.tyro.connect+json;version=1.0""application/vnd.tyro.connect+json;version=0.1"
Content-Typestringrequired
Value"application/json"
Bodyapplication/vnd.tyro.connect+json;version=1.0
locationIdstringrequired

The id of the location as specified by the Tyro Connect system.

originobject

Information relevant to the booking partner that this booking was created with

bookingStatusstring(bookingStatus)

The current status of the booking

Enum"CREATED""ACCEPTED""CANCELLED_BY_CUSTOMER""CANCELLED_BY_MERCHANT""REJECTED"
numberOfPeoplenumber(numberOfPeople)>= 1required

The number of expected guests

paymentsArray of objects(payments)

A list of payments applied to the booking.

startTimestring(date-time)required

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

Example: "2018-05-02T17:30:00.000Z"
endTimestring(date-time)

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

Example: "2018-05-02T18:30:00.000Z"
customerobject(customer)

The customer making the booking

notesstring[ 1 .. 500 ] characters

Notes specific to the booking. Example: 'Window seat please'

assetroomAsset (object) or tableAsset (object)required

Contains asset information of the booking

One of:

The section within the venue

asset.​typestringrequired
Value"ROOM"
asset.​roomsArray of objects(room)non-emptyrequired

The rooms used for the booking

asset.​rooms[].​numberstringrequired

The room number or room id. This field accepts alphanumeric characters e.g MAIN-33

Example: "MAIN-33"
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/vnd.tyro.connect+json;version=1.0' \
  -d '{
    "locationId": "merchant:abc123",
    "origin": {
      "bookingReference": "some-booking-reference"
    },
    "asset": {
      "type": "TABLE",
      "tables": [
        {
          "number": "1"
        }
      ]
    },
    "numberOfPeople": 2,
    "startTime": "2020-03-01T18:00:00Z",
    "bookingStatus": "CREATED"
  }'

Responses

Created

Bodyapplication/vnd.tyro.connect+json;version=1.0
idstringrequired

The id of the booking in the Tyro Connect system

Example: "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149"
locationIdstringrequired

The id of the location as specified by the Tyro Connect system

originobject(origin)

Information relevant to the booking partner that this booking was created with

assettableAsset (object) or roomAsset (object)required
One of:
asset.​typestringrequired
Value"TABLE"
asset.​tableStatusstring(tableStatus)

The current table status of the booking The supported statuses are:

  • SEATED - indicates that the customer connected to the booking has been seated.
  • DINING - indicate that the customer connected to the booking has started dining.
  • CLOSING - indicates that the customer connected to the booking is close to finishing their meal (e.g. when the bill has been printed).
  • FINALISED - indicates that the booking has been finalised (e.g. when the bill has been finalised).
Enum"SEATED""DINING""CLOSING""FINALISED"
asset.​arrivalStatusstring(arrivalStatus)

The customer's arrival status in relation to the booking

Enum"ON_TIME""EARLY""RUNNING_LATE""NO_SHOW"
asset.​tablesArray of objects(table)non-empty

The tables used for the booking

asset.​sectionobject(section)

The section within the venue

asset.​discountsArray of stringsnon-empty
asset.​preOrdersArray of stringsnon-empty
bookingStatusstring(bookingStatus)

The current status of the booking

Enum"CREATED""ACCEPTED""CANCELLED_BY_CUSTOMER""CANCELLED_BY_MERCHANT""REJECTED"
numberOfPeoplenumber(numberOfPeople)>= 1required

The number of expected guests

paymentsArray of objects(payments)

A list of payments applied to the booking.

startTimestring(date-time)

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

Example: "2018-05-02T17:30:00.000Z"
endTimestring(date-time)

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

Example: "2018-05-02T18:30:00.000Z"
customerobject(customer)

The customer making the booking

notesstring[ 1 .. 500 ] characters

Notes specific to the booking. Example: 'Window seat please'

reasonstring(reason)<= 50 characters

The reason the booking was rejected or cancelled. Provided only when bookingStatus is REJECTED, CANCELLED_BY_MERCHANT or CANCELLED_BY_CUSTOMER

Response
application/vnd.tyro.connect+json;version=1.0
{ "id": "2688fcf2-44dd-4c72-88ac-79d0910f2983", "locationId": "merchant:abc123", "bookingStatus": "CREATED", "origin": { "bookingReference": "some-booking-reference" }, "asset": { "type": "TABLE", "tables": [] }, "numberOfPeople": 2, "payments": [ {} ], "startTime": "2020-03-01T18:00:00Z" }

Get Booking

Request

This endpoint is for fetching the details of a booking.

Security
JWT
Path
bookingIdstringrequired

Id of the booking in Tyro Connect that should be retrieved

Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
Acceptstring(acceptHeaderBooking1_0)required

Specifies which version of the API to use. If no value is provided then 0.1 version will be used

Default application/vnd.tyro.connect+json;version=0.1
Enum"application/vnd.tyro.connect+json;version=1.0""application/vnd.tyro.connect+json;version=0.1"
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>'

Responses

The booking response

Bodyapplication/vnd.tyro.connect+json;version=1.0
idstringrequired

The id of the booking in the Tyro Connect system

Example: "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149"
locationIdstringrequired

The id of the location as specified by the Tyro Connect system

originobject(origin)

Information relevant to the booking partner that this booking was created with

assettableAsset (object) or roomAsset (object)required
One of:
asset.​typestringrequired
Value"TABLE"
asset.​tableStatusstring(tableStatus)

The current table status of the booking The supported statuses are:

  • SEATED - indicates that the customer connected to the booking has been seated.
  • DINING - indicate that the customer connected to the booking has started dining.
  • CLOSING - indicates that the customer connected to the booking is close to finishing their meal (e.g. when the bill has been printed).
  • FINALISED - indicates that the booking has been finalised (e.g. when the bill has been finalised).
Enum"SEATED""DINING""CLOSING""FINALISED"
asset.​arrivalStatusstring(arrivalStatus)

The customer's arrival status in relation to the booking

Enum"ON_TIME""EARLY""RUNNING_LATE""NO_SHOW"
asset.​tablesArray of objects(table)non-empty

The tables used for the booking

asset.​sectionobject(section)

The section within the venue

asset.​discountsArray of stringsnon-empty
asset.​preOrdersArray of stringsnon-empty
bookingStatusstring(bookingStatus)

The current status of the booking

Enum"CREATED""ACCEPTED""CANCELLED_BY_CUSTOMER""CANCELLED_BY_MERCHANT""REJECTED"
numberOfPeoplenumber(numberOfPeople)>= 1required

The number of expected guests

paymentsArray of objects(payments)

A list of payments applied to the booking.

startTimestring(date-time)

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

Example: "2018-05-02T17:30:00.000Z"
endTimestring(date-time)

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

Example: "2018-05-02T18:30:00.000Z"
customerobject(customer)

The customer making the booking

notesstring[ 1 .. 500 ] characters

Notes specific to the booking. Example: 'Window seat please'

reasonstring(reason)<= 50 characters

The reason the booking was rejected or cancelled. Provided only when bookingStatus is REJECTED, CANCELLED_BY_MERCHANT or CANCELLED_BY_CUSTOMER

Response
application/vnd.tyro.connect+json;version=1.0
{ "id": "2688fcf2-44dd-4c72-88ac-79d0910f2983", "locationId": "merchant:abc123", "bookingStatus": "CREATED", "origin": { "bookingReference": "some-booking-reference" }, "asset": { "type": "TABLE", "tables": [] }, "numberOfPeople": 2, "startTime": "2020-03-01T18:00:00Z" }

Update Booking

Request

This endpoint is for updating a booking.

Security
JWT
Path
bookingIdstringrequired

Id of the booking in Tyro Connect that should be updated

Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
Acceptstring(acceptHeaderBooking1_0)required

Specifies which version of the API to use. If no value is provided then 0.1 version will be used

Default application/vnd.tyro.connect+json;version=0.1
Enum"application/vnd.tyro.connect+json;version=1.0""application/vnd.tyro.connect+json;version=0.1"
Content-Typestringrequired
Value"application/json"
Bodyapplication/merge-patch+json
assetobject(assetUpdate)
bookingStatusstring(bookingStatus)

The current status of the booking

Enum"CREATED""ACCEPTED""CANCELLED_BY_CUSTOMER""CANCELLED_BY_MERCHANT""REJECTED"
numberOfPeoplenumber(numberOfPeople)>= 1

The number of expected guests

paymentsArray of objects(payments)

A list of payments applied to the booking.

reasonstring(reason)<= 50 characters

The reason the booking was rejected or cancelled. Provided only when bookingStatus is REJECTED, CANCELLED_BY_MERCHANT or CANCELLED_BY_CUSTOMER

customerobject(customer)

The customer making the booking

notesstring[ 1 .. 500 ] characters

Notes specific to the booking. Example: 'Window seat please'

startTimestring(date-time)(time)

The format of the date time is the notation as defined by RFC 3339, section 5.6

endTimestring(date-time)(time)

The format of the date time is the notation as defined by RFC 3339, section 5.6

originobject(origin)

Information relevant to the booking partner that this booking was created with

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 '{
    "bookingStatus": "CANCELLED_BY_CUSTOMER",
    "reason": "Illness"
  }'

Responses

No body content

Response
No content