Get Booking Events

This endpoint is for fetching the events associated with a booking. The events are ordered with the most recent event first.

Request
Security:
path Parameters
bookingId
required
string

Id of the booking in Tyro Connect that should be retrieved

header Parameters
Authorization
required
string
Default: Bearer {$$.env.access_token}
Responses
200

The booking events response

403

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

404

When the provided bookingId does not match a booking stored in the system

get/bookings/{bookingId}/events
Request samples
curl -i -X GET \
  'https://api.tyro.com/connect/bookings/{bookingId}/events' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
data
{
  "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"
    }
  ]
}
Copyright © Tyro Payments 2019-2024. All right reserved.