Create WaitlistEntry का तरीका

क्लाइंट, वेटलिस्ट में शामिल होने का अनुरोध करता है. पार्टनर बैकएंड, अनुरोध करने वाले व्यापारी/कंपनी, सेवा, पार्टी में लोगों की संख्या, और उपयोगकर्ता के लिए वेटलिस्ट में शामिल होने का विकल्प बनाता है. सफल होने पर, पार्टनर को वेटलिस्ट का आईडी आईडी वापस भेज देना चाहिए या कारोबारी नियम की गड़बड़ी (जैसे, अगर पार्टी का साइज़ तय की गई सीमा से ज़्यादा है या वेटलिस्ट में शामिल नहीं हो सकता वगैरह) दिखाना चाहिए. अचानक हुई गड़बड़ी, स्टैंडर्ड एचटीटीपी स्टेटस कोड का इस्तेमाल करके दिखनी चाहिए.

अनुरोध करें

CreateWaitlistEntryRequest

रिटर्न वैल्यू

CreateWaitlistEntryResponse


// Request for a user to join the waitlist.
//
// Reserve with Google may retry REST HTTP requests if no response is
// received. If the exact same CreateWaitlistEntry is received a second time,
// then the same CreateWaitlistResponse must be returned. A second waitlist
// entry must not be created.
message CreateWaitlistEntryRequest {
  // Required. Partner-provided ID for the merchant.
  string merchant_id = 1;

  // Required. Partner-provided ID for the service.
  string service_id = 2;

  // Required. The party size requested for the waitlist entry.
  int32 party_size = 3;

  // Required. Personal information of the user joining the waitlist.
  UserInformation user_information = 4;

  // A string from the user which contains any special requests or additional
  // information that they would like to notify the merchant about.
  // This will be populated when the user submits an additional request to
  // Reserve with Google. The partner can disable this functionality at the
  // service level by setting supports_additional_request to false in the
  // service feed.
  string additional_request = 5;

  // Required. Used to differentiate retries from separate requests. If the
  // exact same CreateWaitlistEntry is received a second time, (including
  // idempotency_token) then the same CreateWaitlistResponse must be returned.
  string idempotency_token = 6;
}

// Response for the CreateWaitlistEntry RPC with the waitlist entry ID or any
// failing business logic information.
message CreateWaitlistEntryResponse {
  // Unique partner-provided ID for the newly created entry in the waitlist.
  // Required if the waitlist entry was created successfully. Unique for all
  // time.
  string waitlist_entry_id = 1;

  WaitlistBusinessLogicFailure waitlist_business_logic_failure = 2;
}

WaitlistEntry के सैंपल बनाएं

अनुरोध करें

{
  "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" }