API を介した販売者のステータスのクエリ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ユースケース
Google Maps Booking API には、さまざまな Actions Center 統合やローカル サービス広告広告枠の個々の販売者のステータスをプログラムで取得するために使用できる 2 つのメソッドが用意されています。
Merchant Status API のユースケース:
- 既存の顧客関係管理ツールを強化して、お客様のインベントリが Actions Center プラットフォームにどのように表示されるかをお客様に示します。
- 販売者の在庫状況と一致ステータスをトラッキングするダッシュボードを作成します。
- 販売者の一致ステータスと予約可能ステータスをプログラムで取得し、誤った情報を修正してデータ品質を改善します。
販売者のステータスにはどのような情報が含まれますか?
MerchantStatus には次の情報が含まれます。
- 販売者の在庫状況: 予約販売または待機リストの販売者の両方に適用されます。
- 販売者のマッチング ステータス: 一致したビジネス リスティングの詳細が含まれます
- Google ローカル サービス広告のみ)一致した販売者サービス プロバイダ: お客様 ID とサービス カテゴリが含まれます。
- 「Google で予約」で販売者がどのように表示されるかを示す URL。
単一販売者のステータスを検索する
inventory.partners.merchants.getStatus を使用して、単一の販売者のステータスを取得できます。
GET https://mapsbooking.googleapis.com/v1alpha/inventory/partners/{partnerId}/merchants/{merchantId}/status
Python コードのサンプルを以下に示します(他の言語の例については、こちらをご覧ください)。
from google.auth.transport.requests import AuthorizedSession
from google.oauth2 import service_account
credentials = service_account.Credentials.from_service_account_file(
'./your_key.json')
scoped_credentials = credentials.with_scopes(
['https://www.googleapis.com/auth/mapsbooking'])
authed_session = AuthorizedSession(scoped_credentials)
response = authed_session.get('https://partnerdev-mapsbooking.googleapis.com' +
'/v1alpha/inventory/partners/123456789/merchants/001/status')
MerchantStatus レスポンスの例は次のようになります。
{
"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
レスポンスの例は次のようになります。
{
"merchantStatuses": [
{
"name": "partners/123456789/merchants/002/status",
"merchantName": "Bar Foo Restaurant",
"inputGeoInfo": {
"unstructured_address": "234 Bar Foo Street, Mountain View"
},
"processingStatus": "COMPLETED",
"bookingStatus": {
"hasValidFutureInventory": true
},
"waitlistStatus": {},
},
...
{
"name": "partners/123456789/merchants/080/status",
"merchantName": "Baz Restaurant",
"inputGeoInfo": {
"unstructured_address": "345 Baz Street, Mountain View"
},
"processingStatus": "COMPLETED",
"bookingStatus": {
"hasValidFutureInventory": true
},
"waitlistStatus": {
"hasValidWaitlistService": true
},
},
],
"nextPageToken": "AAABBBB"
}
このレスポンスには、フィルタ条件を満たす 50 個の MerchantStatus が merchant_id
で並べ替えられて含まれます。レスポンスには、次のページをクエリするためのページトークンも含まれます(最後のページでない場合に限ります)。
なお、フィルタ条件はすべてのページで統一する必要があります。
ベスト プラクティス
販売者のステータスはほとんどの場合頻繁に変更されないため、取得した結果をキャッシュに保存し、定期的に(数時間ごとに)新しいクエリで取得することをおすすめします。1 秒あたりのリクエスト数が過度に多いと判断された場合、Actions Center によってクエリがスロットリングされることがあります。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eThe Google Maps Booking API provides methods to retrieve the status of individual merchants for Actions Center integrations or Local Services Ads inventory.\u003c/p\u003e\n"],["\u003cp\u003eYou can enhance CRM tools, build dashboards, and programmatically fix merchant information using the Merchant Status API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003einventory.partners.merchants.getStatus\u003c/code\u003e allows for looking up the status of a single merchant, while \u003ccode\u003einventory.partners.merchants.status.list\u003c/code\u003e enables retrieval in bulk with filtering options.\u003c/p\u003e\n"],["\u003cp\u003eMerchant status includes inventory, matching, service provider (LSA only), and Reserve with Google surfacing details.\u003c/p\u003e\n"],["\u003cp\u003eIt's recommended to cache retrieved results and periodically refresh them to avoid excessive API requests and potential throttling.\u003c/p\u003e\n"]]],["The Merchant Status API provides methods to retrieve merchant statuses for Actions Center integrations or Local Services Ads. Key actions include using the API to enhance customer relationship management tools, build tracking dashboards, and programmatically fix incorrect merchant data. Merchants statuses, accessible individually or in bulk, contain inventory, matching details, service provider specifics, and URLs. Caching is encouraged for efficiency, given the infrequent changes in status. Bulk retrieval can filter by inventory or matching conditions.\n"],null,["# 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 Actions Center 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 the Actions Center platform.\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 via Reserve with 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/local-services/e2e/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."]]