This endpoint is for fetching the events associated with a booking. The events are ordered with the most recent event first.
The booking events response
When you don't have the right permissions to a booking for the provided location
When the provided bookingId
does not match a booking stored in the system
curl -i -X GET \ 'https://api.tyro.com/connect/bookings/{bookingId}/events' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "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" } ] }