Waitlists Payload Sample

  • BatchGetWaitEstimates allows merchants to retrieve the current wait times for various party sizes for a specific service, such as reservations.

  • The response includes a waitlist_status indicating if the waitlist is open and a list of wait_estimate objects detailing the estimated wait for each party size, potentially using parties_ahead_count or remaining empty for immediate seating.

  • Using CreateWaitlistEntry, GetWaitlistEntry, and DeleteWaitlistEntry, users can add themselves to the waitlist, check their status and estimated wait, and remove themselves from the waitlist, respectively.

  • Wait estimates can vary based on real-time availability and operational constraints, such as party size limitations near closing time.

BatchGetWaitEstimates

This example illustrates a case where a restaurant usually allows party_size values from 2 to 10 but at the time of the request, party_size values higher than 7 can no longer be accomodated (close to closing time, for example) and party_size of 2 has actually no wait.

Get wait request

{
  "merchant_id": "dining-1",
  "party_size": [2, 3, 4, 5, 6, 7, 8, 9, 10],
  "service_id": "reservation"
}

Get wait response

{
  "waitlist_status": "OPEN",
  "wait_estimate": [
    { "party_size": 2, "wait_length": {} },
    { "party_size": 3, "wait_length": { "parties_ahead_count": 3 } },
    { "party_size": 4, "wait_length": { "parties_ahead_count": 3 } },
    { "party_size": 5, "wait_length": { "parties_ahead_count": 3 } },
    { "party_size": 6, "wait_length": { "parties_ahead_count": 3 } },
    { "party_size": 7, "wait_length": { "parties_ahead_count": 3 } }
  ]
}

CreateWaitlistEntry

Create request

{
  "idempotency_token": "14620365692592881354",
  "merchant_id": "dining-1",
  "party_size": 3,
  "service_id": "reservation",
  "user_information": {
    "family_name": "John",
    "given_name": "Smith",
    "telephone": "+81 80-1111-2222",
    "user_id": "123456789"
  }
}

Create response

{ "waitlist_entry_id": "MYS-1668739060" }

GetWaitlistEntry

Get request

{ "waitlist_entry_id": "MYS-1668739060" }

Get response

{
  "waitlist_entry": {
    "wait_estimate": {
      "party_size": 3,
      "wait_length": { "parties_ahead_count": 3 }
    },
    "waitlist_entry_state": "WAITING",
    "waitlist_entry_state_times": { "created_time_seconds": 1234567890 }
  }
}

DeleteWaitlistEntry

Delete request

{ "waitlist_entry_id": "MYS-1668739060" }

Delete response

{}