Create booking

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

Request
Security:
header Parameters
Authorization
required
string
Default: Bearer {$$.env.access_token}
Accept
required
string (acceptHeaderBooking1_0)
Default: application/vnd.tyro.connect+json;version=0.1

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

Enum: "application/vnd.tyro.connect+json;version=1.0" "application/vnd.tyro.connect+json;version=0.1"
Content-Type
required
string
Value: "application/json"
Request Body schema: application/json
locationId
required
string

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

required
object

Contains asset information of the booking

numberOfPeople
required
number (numberOfPeople) >= 1

The number of guests

startTime
string <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

bookingStatus
required
string

The current status of the booking

Value: "CREATED"
Responses
201

Created

400

When the provided payload is not valid

403

When you don't have the right permissions to create a booking for the provided location

post/bookings
Request samples
application/json
{
  • "locationId": "merchant:abc123",
  • "asset": {
    },
  • "bookingStatus": "CREATED",
  • "numberOfPeople": 2,
  • "startTime": "2021-01-01T17:00:00Z"
}
Response samples
application/json
{
  • "id": "2688fcf2-44dd-4c72-88ac-79d0910f2983",
  • "locationId": "merchant:abc123",
  • "asset": {
    },
  • "bookingStatus": "CREATED",
  • "numberOfPeople": 2,
  • "startTime": "2021-01-01T17:00:00Z"
}
Copyright © Tyro Payments 2019-2022. All right reserved.