Webhook Response Examples

Visit Events

📘

Response Fields for Visit Events

To see descriptions and value options for included fields check out the documentation section for the Create/Update/Get Visit endpoints (which have the same responses as the Visit webhook 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.
The responses are very similar, but Waitlist visits do have some additional Waitlist specific fields, such as position.

{
    "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",
        "pendingExpireTime": null,
        "remoteIp": "",
        "country": "US",
        "region": "ny",
        "city": "city name",
        "isBlock": false,
        "source": "WEB-APP",
        "locale": null,
        "partySize": 1,
        "resources": {
            "9sxvHtjutXVfTZMNMzP9": 1
        },
        "resourceIds": [
            "9sxvHtjutXVfTZMNMzP9"
        ],
        "services": {},
        "serviceIds": [],
        "fields": {},
        "dataFields": [],
        "tags": [],
        "waitlistTime": "2022-05-19T14:06:11.638Z",
        "serveTime": null,
        "completedTime": null,
        "ngrams": [],
        "estWaitDuration": 368,
        "position": 5,
        "lastWaitingPosition": 5,
        "originalPosition": 5,
        "ticket": "A001",
        "numVisits": 1,
        "prevEstWaitDuration": 368,
        "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",
        "pendingExpireTime": null,
        "remoteIp": "",
        "country": "US",
        "region": "ny",
        "city": "city name",
        "isBlock": false,
        "source": "WEB-APP",
        "locale": null,
        "partySize": 1,
        "resources": {},
        "resourceIds": [],
        "services": {},
        "serviceIds": [],
        "fields": {},
        "dataFields": [],
        "tags": [],
        "bookingTime": "2022-05-19T13:58:26.528Z",
        "waitlistTime": null,
        "serveTime": null,
        "completedTime": null,
        "ngrams": [],
        "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",
        "pendingExpireTime": null,
        "ticket": "A125",
        "resourceIds": [
            "9sxvHtjutXVfTZMNMzR9"
        ],
        "dataFields": [],
        "resources": {
            "9sxvHtjutXVfTZMNMzR9": 1
        },
        "created": "2022-05-19T14:06:11.638Z",
        "numVisits": 1,
        "externalCustomerId": "",
        "services": {},
        "ngrams": [
            "p:1",
            "r:9sxvHtjutXVfTZMNMzR9"
        ],
        "source": "WEB-APP",
        "createdBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
        "remoteIp": "100.34.242.27",
        "customerId": "uGMb0MmhdWsalcmQ9BC06j",
        "isAnonymized": false,
        "lastWaitingPosition": 5,
        "name": "",
        "fields": {},
        "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": [],
        "resources": {
            "9sxvHtjutXVfTZMNMzR9": 1
        },
        "created": "2022-05-19T14:06:11.638Z",
        "numVisits": 1,
        "externalCustomerId": "",
        "services": {},
        "ngrams": [
            "p:1",
            "r:9sxvHtjutXVfTZMNMzR9"
        ],
        "source": "WEB-APP",
        "createdBy": "RUlfUPgKD3NVd7YFIc8sYImlZIf1",
        "remoteIp": "100.34.242.27",
        "customerId": "uGMb0MmhdWsalcmQ9BC06j",
        "isAnonymized": false,
        "lastWaitingPosition": 5,
        "name": "",
        "fields": {},
        "id": "Kk1BeidF0N4p8wzp2J0x",
        "waitDuration": 630
    }
}

Message Events

{
    "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,
        "cost": 0.00055,
        "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"
    }
}

Location Events