Waitlists Payload Sample

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

{}