Webhook Response Examples
Webhooks use the same schema definitions as the API for representing objects, however, for convenience, we've isolated a few specific examples provided below. To see descriptions and value options for fields included in these examples, check out the corresponding documentation section for those endpoints.
Visit Events
Visit Created Events
Below are two examples of a visit.created
response, one for a Waitlist visit, and the other for a Booking. There will only ever be one visit.created
response per visit, which is made at the time a guest is first added to the Waitlist (not a restored or Booking synced visit), and when a new Booking is first scheduled.
Documentation section for the Create/Update/Get Visit endpoints
{
"id": "0T6HyBrXIZuDl73ViyRp",
"created": "2022-05-19T14:06:11.923Z",
"accountId": "itiDKblwIsbJsAxO8kFz",
"type": "visit.created",
"data": {
"id": "Kk1BeidF0N4p8wzp2J0x",
"locationId": "P3HCgTiw7IjGhxM2qmjt",
"state": "WAITING",
"customerId": "uGMb0MmhdWsalcmQ9DC06j",
"firstName": "",
"lastName": "",
"phone": "",
"name": "",
"externalCustomerId": "",
"notes": "",
"publicId": "Kk1Bui",
"isAnonymized": false,
"created": "2022-05-19T14:06:11.638Z",
"createdBy": "RUlfUPiDD3NVd7YFIc8sYIslZIf1",
"updated": "2022-05-19T14:06:11.638Z",
"updatedBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
"remoteIp": "",
"country": "US",
"region": "ny",
"city": "city name",
"isBlock": false,
"source": "WEB-APP",
"locale": null,
"partySize": 1,
"resourceIds": [
"9sxvHtjutXVfTZMNMzP9"
],
"serviceIds": [],
"dataFields": [],
"tags": [],
"waitlistTime": "2022-05-19T14:06:11.638Z",
"serveTime": null,
"completedTime": null,
"estWaitDuration": 368,
"position": 5,
"lastWaitingPosition": 5,
"originalPosition": 5,
"ticket": "A001",
"numVisits": 1,
"originalEstWaitDuration": 368
}
}
{
"id": "0T6HwEtZs8ASfL52phLj",
"created": "2022-05-19T13:58:26.925Z",
"accountId": "itiDKblwIrcJsAxO8kGz",
"type": "visit.created",
"data": {
"id": "9QvKDkhrXIxNLdS9xMkf",
"locationId": "P3HCgTiw7IjFhxM2qmjt",
"state": "BOOKED",
"customerId": "CsgoBO4eR1iNyg6PF2PSkt",
"date": "2022-05-19T10:00",
"duration": 1800,
"firstName": "",
"lastName": "",
"name": "",
"externalCustomerId": "",
"notes": "",
"publicId": "9QvSDk",
"isAnonymized": false,
"created": "2022-05-19T13:58:26.528Z",
"createdBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
"updated": "2022-05-19T13:58:26.528Z",
"updatedBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
"remoteIp": "",
"country": "US",
"region": "ny",
"city": "city name",
"isBlock": false,
"source": "WEB-APP",
"locale": null,
"partySize": 1,
"resourceIds": [],
"serviceIds": [],
"dataFields": [],
"tags": [],
"bookingTime": "2022-05-19T13:58:26.528Z",
"waitlistTime": null,
"serveTime": null,
"completedTime": null,
"ticket": "A100",
"numVisits": 1
}
}
Visit Updated Events
Every time a change is made to a visit, it will generate a visit.updated
response. This can be anything from a position change on the Waitlist as other guests are served, an update to their customer information by a staff user, or a change in the state, such as going from WAITING to SERVING, to COMPLETED.
Below is an example for the visit.created
event, when a Waitlist visit has been Served. The same type of event for a booking will look very similar, except it will not include fields such as position
and timestamp fields that are only relevant for Waitlist visits (unless it is a Booking to Waitlist synced visit).
Note there is a "before" and and "after" object.
{
"id": "0T6I0pmzZ4IKBbzdQuRn",
"created": "2022-05-19T14:16:42.057Z",
"accountId": "itiDKblwIrcJsAxO8kFz",
"type": "visit.updated",
"before": {
"updated": "2022-05-19T14:06:11.638Z",
"serviceIds": [],
"estWaitDuration": 368,
"originalPosition": 5,
"serveTime": null,
"waitlistTime": "2022-05-19T14:06:11.638Z",
"locationId": "P3HCgTiw7IjFhxM2qmjt",
"country": "US",
"updatedBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
"partySize": 1,
"completedTime": null,
"isBlock": false,
"originalEstWaitDuration": 368,
"lastName": "",
"publicId": "Kk1Bei",
"position": 5,
"tags": [],
"firstName": "",
"city": "philadelphia",
"notes": "",
"state": "WAITING",
"locale": null,
"region": "pa",
"ticket": "A125",
"resourceIds": [
"9sxvHtjutXVfTZMNMzR9"
],
"dataFields": [],
"created": "2022-05-19T14:06:11.638Z",
"numVisits": 1,
"externalCustomerId": "",
"source": "WEB-APP",
"createdBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
"remoteIp": "100.34.242.27",
"customerId": "uGMb0MmhdWsalcmQ9BC06j",
"isAnonymized": false,
"lastWaitingPosition": 5,
"name": "",
"id": "Kk1BeidF0N4p8wzp2J0x"
},
"after": {
"updated": "2022-05-19T14:16:41.711Z",
"serviceIds": [],
"originalPosition": 5,
"serveTime": "2022-05-19T14:16:41.711Z",
"waitlistTime": "2022-05-19T14:06:11.638Z",
"locationId": "P3HCgTiw7IjFhxM2qmjt",
"country": "US",
"updatedBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
"partySize": 1,
"completedTime": null,
"isBlock": false,
"originalEstWaitDuration": 368,
"lastName": "",
"publicId": "Kk1Bei",
"position": 1,
"tags": [],
"firstName": "",
"city": "philadelphia",
"notes": "",
"state": "SERVING",
"locale": null,
"region": "pa",
"pendingExpireTime": null,
"ticket": "A125",
"resourceIds": [
"9sxvHtjutXVfTZMNMzR9"
],
"dataFields": [],
"created": "2022-05-19T14:06:11.638Z",
"numVisits": 1,
"externalCustomerId": "",
"source": "WEB-APP",
"createdBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
"remoteIp": "100.34.242.27",
"customerId": "uGMb0MmhdWsalcmQ9BC06j",
"isAnonymized": false,
"lastWaitingPosition": 5,
"name": "",
"id": "Kk1BeidF0N4p8wzp2J0x",
"waitDuration": 630
}
}
Visit Removed Events
Not to be confused with "removing" a visit from the Waitlist or cancelling a Booking, a visit.removed
event is only triggered when a Visit has been completely deleted via the API _or_ when the customer has been removed from the customer database in the UI. The visit.removed
webhook response will provide a snapshot of all the visit data at the point in which the visit was deleted. Below is a response example from a Waitlist visit that has been deleted via the API.
{
"id": "0ToSijX8BGkVknpf9GO9",
"created": "2023-04-04T12:40:12.762Z",
"accountId": "itiDKblwIrcJsAxO8kSz",
"type": "visit.removed",
"data": {
"followUpSmsTime": null,
"country": "US",
"lastName": "",
"bookingReminderEmailTime": null,
"externalCustomerId": "",
"isBlock": false,
"notes": "",
"city": "city name",
"source": "WEB-APP",
"locale": "en-US",
"partySize": 1,
"dataFields": [
{ "values": [], "id": "Cu7HUgTbPvQScHE4NvBO" },
{ "values": [], "id": "oB1RiBrMPAUmsN8MUhPi" }
],
"waitlistTime": "2023-04-04T12:37:24.013Z",
"locationId": "mu9bxRmGIdkqIK61fDtP",
"lastWaitingPosition": 1,
"customerId": "sr9RaeQsz36XjhrS3M5Z1h",
"isAnonymized": false,
"bookingReminderAppTime": null,
"state": "WAITING",
"resourceIds": ["JvywhsKLmbi8vcWFBzCr"],
"remoteIp": "2600:4040:7374:c900:1843:a186:42f:d415",
"updatedBy": "RUlfUPgKD3NVd7YFIc8sYImlZIc8",
"followUpEmailTime": null,
"ticket": "A052",
"created": "2023-04-04T12:37:24.013Z",
"pendingExpireTime": null,
"bookingReminderSmsTime": null,
"tags": [],
"firstName": "",
"serviceIds": ["7OUewmmC8vGHbmoAHcOP", "2Jm5QEZ3JDiDEwxcJyhq"],
"createdBy": "RUlfUPgKD3NVd7YFIc8sYImlZIc8",
"name": "",
"numVisits": 1,
"position": 1,
"followUpAppTime": null,
"region": "pa",
"updated": "2023-04-04T12:37:24.013Z",
"publicId": "GixH8c",
"originalPosition": 1,
"originalEstWaitDuration": 1356,
"estWaitDuration": 1356,
"id": "GixH8cJxBp9EeCL8kTyq",
"accountId": "itiDKblwIrcJsAxO8kFz"
}
}
Message Events
Documentation section for Message endpoints
{
"id": "0T6229ytZ6Ud3AS2OCsE",
"created": "2022-05-16T20:41:36.627Z",
"accountId": "itiTKblwsrcJsAxO8kFz",
"type": "message.created",
"data": {
"id": "dIaq4Ek6xoxnveDBDocI",
"channel": "SMS",
"providerId": "TWILIO",
"isExternalProvider": false,
"providerAccountId": null,
"recipient": "[email protected]",
"recipientName": "Email Test",
"sender": "[email protected]",
"senderName": "My Waitlist",
"locationId": "dnVVslEybbg4SQmCw9kg",
"customerId": "vdeDJPsfRQppoAJclB1Kqd",
"externalCustomerId": null,
"visitId": "mmKbn1nxOcXG5PUZ80K3",
"userId": null,
"type": "WAITLIST-ALERT",
"body": "<p>Hi Email!</p>\n<p>An Academic Advisor is now preparing your file and awaiting your return, please check in with the Secretary when you arrive.\nIf you cannot make it, please <a href=\"https://waitwhile.com/l/mywaitlist2/mmKbn1\">cancel yourself</a>.</p>\n<p>We look forward to seeing you soon!</p>\n<p><em>My Waitlist</em></p>\n",
"externalId": null,
"isIncoming": false,
"isAnonymized": false,
"isRead": true,
"state": "PENDING",
"updated": "2022-05-16T20:41:36.231Z",
"created": "2022-05-16T20:41:36.197Z",
"updatedBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
"createdBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
"subject": "It's your turn at My Waitlist",
"templateId": "guest-alert",
"substitutions": {
"showEmailConfirmationLink": false,
"messageType": "WAITLIST-ALERT",
"clientHostname": "app.waitwhile.com",
"publicClientHostname": "waitwhile.com",
"locationId": "dnVVslEybbf5FQmCw9kg",
"businessName": "My Waitlist",
"waitlistId": "mywaitlist",
"shortName": "mywaitlist",
"showBranding": true,
"replyTo": "[email protected],[email protected]",
"publicId": "mmKbn1",
"isBooking": false,
"qrCodeImageLink": "https://api.waitwhile.com/v2/public/visits/mywaitlist2/mmKbn1/qrcode",
"body": "<p>Hi Email!</p>\n<p>An Academic Advisor is now preparing your file and awaiting your return, please check in with the Secretary when you arrive.\nIf you cannot make it, please <a href=\"https://waitwhile.com/l/mywaitlist2/mmKbn1\">cancel yourself</a>.</p>\n<p>We look forward to seeing you soon!</p>\n<p><em>My Waitlist</em></p>\n",
"message": "<p>Hi Email!</p>\n<p>An Academic Advisor is now preparing your file and awaiting your return, please check in with the Secretary when you arrive.\nIf you cannot make it, please <a href=\"https://waitwhile.com/l/mywaitlist2/mmKbn1\">cancel yourself</a>.</p>\n<p>We look forward to seeing you soon!</p>\n<p><em>My Waitlist</em></p>\n",
"subject": "It's your turn at My Waitlist",
"sendingDomain": "v2-email.waitwhile.com"
},
"numSegments": 1,
"accountId": "itiDKblwIrcJZ1AxO8kFz"
}
}
Updated 17 days ago