{"name":"partners/123456789/merchants/001/status","merchantName":"Foo Bar Restaurant","inputGeoInfo":{"unstructured_address":"123 Foo Bar Street, Mountain View"},"processingStatus":"COMPLETED","bookingStatus":{"hasValidFutureInventory":true},"waitlistStatus":{"hasValidWaitlistService":true}"geoMatch":{"name":"Foo Bar Restaurant","formattedAddress":"123 Foo Bar St, Mountain View, CA 94043","placeId":"ChIAAAAAAAAABBBBBBBB"},"directUrls":[{"type":"BOOKING","url":"https://reserve-partnerdev.sandbox.google.com/maps/reserve/v/dine/m/Nwaaaaa"},{"type":"WAITLIST","url":"https://reserve-partnerdev.sandbox.google.com/maps/reserve/v/wait/c/iDbbbbb"}]}
אחזור סטטוסים של מוכרים בכמות גדולה
אפשר לאחזר את הסטטוסים של כל המוכרים או של קבוצת מוכרים שעומדים בתנאי מלאי שטחי פרסום או התאמה מסוימים באמצעות inventory.partners.merchants.status.list. לדוגמה, אפשר להשתמש בקריאה הזו כדי לקבל את כל המוכרים שלא נמצאו להם התאמות עם מלאי זמין להזמנות לתאריכים עתידיים:
GET https://mapsbooking.googleapis.com/v1alpha/inventory/partners/{partnerId}/merchants/status?pageSize=50&bookingInventoryStatusRestrict=HAS_VALID_FUTURE_INVENTORY&geoMatchRestrict=GEO_UNMATCHED
התשובה תכיל 50 MerchantStatus שעומדים בתנאי הסינון וממוינים לפי merchant_id. התשובה כוללת גם אסימון דף (אם זה לא הדף האחרון) לשליחת שאילתה לדף הבא.
חשוב לזכור: תנאי הסינון צריכים להיות עקביים בכל הדפים.
שיטות מומלצות
מאחר שסטטוסי המוכרים לא משתנים לעיתים קרובות ברוב המקרים, מומלץ לשמור את התוצאות שאוחזרו במטמון ולאחזר אותן מדי פעם (למשל, כל כמה שעות) באמצעות שאילתות חדשות. אם מספר הבקשות לשנייה גבוה מדי, יכול להיות שמערכת Actions Center תגביל את השאילתות.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003eGoogle Maps Booking API lets you programmatically check the status of individual merchants for integrations or Local Services Ads inventory.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the Merchant Status API to track inventory, enhance customer relationship tools, and improve data quality.\u003c/p\u003e\n"],["\u003cp\u003eMerchant status provides details on inventory, matching status, service provider (for Local Services Ads), and Google surfacing.\u003c/p\u003e\n"],["\u003cp\u003eThe API offers methods to look up the status of single or multiple merchants based on specified criteria.\u003c/p\u003e\n"],["\u003cp\u003eCaching retrieved results and periodic refreshes are recommended to avoid excessive API requests and potential throttling.\u003c/p\u003e\n"]]],["The Merchant Status API offers methods to retrieve merchant inventory and matching status for Google integrations like Local Services Ads. Key actions include: retrieving a single merchant's status via a GET request, and bulk retrieval of statuses based on inventory or matching conditions. The MerchantStatus data includes inventory status, matching details, associated URLs, and optionally, service provider data for Local Services Ads. Caching retrieved results for several hours is encouraged to manage the rate of API requests.\n"],null,["# Reservations Waitlists Querying Merchant Status via the API\n\nUse cases\n---------\n\n\n[Google Maps Booking API](/maps-booking/reference/maps-booking-api/rest) provides two methods, which can be used\nto programmatically retrieve a status of the individual merchants for\nvarious integrations or\n[Local Services Ads](https://ads.google.com/local-services-ads)\ninventory.\n\nUse cases for Merchant Status API:\n\n- Enhance existing customer relation management tools to demonstrate your customers how their inventory is surfaced on Google.\n- Build a dashboard to track the inventory status and matching status of your merchants.\n- Programmatically retrieve matching and bookable statuses of your merchants and fix any incorrect information to improve data quality.\n\nWhat does the merchant status contain\n-------------------------------------\n\nThe\n[MerchantStatus](/maps-booking/reference/maps-booking-api/rest/v1alpha/MerchantStatus) contains the following information:\n\n- Merchant inventory status: applies to both booking and/or waitlist merchants.\n- Merchant matching status: includes details on the matched business listing\n- For [Google Local Services Ads](https://ads.google.com/local-services-ads) only) Matched merchant service provider: includes the customer ID and service categories.\n- The URLs to demonstrate how the merchant is surfaced on Google.\n\nLook up a single merchant status\n--------------------------------\n\nYou can get the status of a single merchant using\n[inventory.partners.merchants.getStatus](/maps-booking/reference/maps-booking-api/rest/v1alpha/inventory.partners.merchants/getStatus): \n\n```text\nGET https://mapsbooking.googleapis.com/v1alpha/inventory/partners/{partnerId}/merchants/{merchantId}/status\n```\n\nHere is a Python code sample (see examples in more languages\n[here](/actions-center/verticals/reservations/waitlists/reference/real-time-updates-rest/code-samples)): \n\n```python\nfrom google.auth.transport.requests import AuthorizedSession\nfrom google.oauth2 import service_account\n\ncredentials = service_account.Credentials.from_service_account_file(\n './your_key.json')\nscoped_credentials = credentials.with_scopes(\n ['https://www.googleapis.com/auth/mapsbooking'])\nauthed_session = AuthorizedSession(scoped_credentials)\n\nresponse = authed_session.get('https://partnerdev-mapsbooking.googleapis.com' +\n '/v1alpha/inventory/partners/123456789/merchants/001/status')\n```\n\nAn example\n[MerchantStatus](/maps-booking/reference/maps-booking-api/rest/v1alpha/MerchantStatus) response looks like: \n\n```carbon\n {\n \"name\": \"partners/123456789/merchants/001/status\",\n \"merchantName\": \"Foo Bar Restaurant\",\n \"inputGeoInfo\": {\n \"unstructured_address\": \"123 Foo Bar Street, Mountain View\"\n },\n \"processingStatus\": \"COMPLETED\",\n \"bookingStatus\": {\n \"hasValidFutureInventory\": true\n },\n \"waitlistStatus\": {\n \"hasValidWaitlistService\": true\n }\n \"geoMatch\": {\n \"name\": \"Foo Bar Restaurant\",\n \"formattedAddress\": \"123 Foo Bar St, Mountain View, CA 94043\",\n \"placeId\": \"ChIAAAAAAAAABBBBBBBB\"\n },\n \"directUrls\": [\n {\n \"type\": \"BOOKING\",\n \"url\": \"https://reserve-partnerdev.sandbox.google.com/maps/reserve/v/dine/m/Nwaaaaa\"\n },\n {\n \"type\": \"WAITLIST\",\n \"url\": \"https://reserve-partnerdev.sandbox.google.com/maps/reserve/v/wait/c/iDbbbbb\"\n }\n ]\n }\n```\n\nRetrieve merchant statuses in bulk\n----------------------------------\n\nYou can retrieve statuses of all merchants, or a group of merchants\nsatisfying certain inventory/matching conditions, using\n[inventory.partners.merchants.status.list](/maps-booking/reference/maps-booking-api/rest/v1alpha/inventory.partners.merchants.status/list). For example, you can make\nthis call to get all unmatched merchants with valid future-dated booking\ninventory: \n\n```scdoc\nGET https://mapsbooking.googleapis.com/v1alpha/inventory/partners/{partnerId}/merchants/status?pageSize=50&bookingInventoryStatusRestrict=HAS_VALID_FUTURE_INVENTORY&geoMatchRestrict=GEO_UNMATCHED\n```\n\nA sample response would look like this: \n\n```carbon\n {\n \"merchantStatuses\": [\n {\n \"name\": \"partners/123456789/merchants/002/status\",\n \"merchantName\": \"Bar Foo Restaurant\",\n \"inputGeoInfo\": {\n \"unstructured_address\": \"234 Bar Foo Street, Mountain View\"\n },\n \"processingStatus\": \"COMPLETED\",\n \"bookingStatus\": {\n \"hasValidFutureInventory\": true\n },\n \"waitlistStatus\": {},\n },\n ...\n {\n \"name\": \"partners/123456789/merchants/080/status\",\n \"merchantName\": \"Baz Restaurant\",\n \"inputGeoInfo\": {\n \"unstructured_address\": \"345 Baz Street, Mountain View\"\n },\n \"processingStatus\": \"COMPLETED\",\n \"bookingStatus\": {\n \"hasValidFutureInventory\": true\n },\n \"waitlistStatus\": {\n \"hasValidWaitlistService\": true\n },\n },\n ],\n \"nextPageToken\": \"AAABBBB\"\n }\n```\n\nThis response will contain 50\n[MerchantStatus](/maps-booking/reference/maps-booking-api/rest/v1alpha/MerchantStatus) that satisfy the filtering conditions and ordered by\n`merchant_id`. The response also contains a page token (if it is\nnot the last page) to query the next page.\n\nPlease note: the filtering conditions should be consistent across all\npages.\n\nBest Practices\n--------------\n\nSince merchant statuses do not change frequently in most times, it is\nencouraged to cache the retrieved results and periodically (e.g. every few\nhours) retrieve them via new queries. The Actions Center may throttle your\nqueries if the number of requests per second deem to be excessively high."]]