BatchGetWaitEstimates
這個範例說明餐廳通常允許 party_size
值的情況
從 2 到 10,但在要求時,高於 7 的 party_size
值不能
時間較長 (例如打烊時間),而 2 的 party_size
不必等候
取得等候要求
{ "merchant_id": "dining-1", "party_size": [2, 3, 4, 5, 6, 7, 8, 9, 10], "service_id": "reservation" }
取得等待回應
{ "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
提出要求
{ "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" } }
建立回覆
{ "waitlist_entry_id": "MYS-1668739060" }
GetWaitlistEntry
取得請求
{ "waitlist_entry_id": "MYS-1668739060" }
取得回應
{ "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
刪除請求
{ "waitlist_entry_id": "MYS-1668739060" }
刪除回應
{}