/api/v4/locations/update拠点を更新する
既存の拠点の書き込み可能なフィールドを更新します。送信したフィールドのみが変更されます。
パラメーター
ボディ
必須と示されたネストされたフィールドは、その親フィールドを送信する場合にのみ適用されます。親フィールドが任意で省略した場合、その必須の子フィールドは適用されません。
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
| input.id | string | 必須 | The location's Base64-encoded Relay ID to update. |
| input.name | string | 任意 | Business name. |
| input.street | string | 任意 | Street address. |
| input.city | string | 任意 | City. |
| input.stateIso | string | 任意 | State/region ISO code. |
| input.postalCode | string | 任意 | Postal or ZIP code. |
| input.countryIso | string | 任意 | Two-letter country ISO code. |
| input.phone | string | 任意 | Primary phone number. |
| input.bizUrl | string | 任意 | Business website URL. Published to directories as the location's website. |
| input.primaryGbpSiteCategoryId | string | 任意 | Primary Google Business Profile category, as a GCID (e.g. `gcid:restaurant`). Resolved against `countryIso`, so send the two together. |
| input.additionalGbpSiteCategoryIds | array of strings | 任意 | Additional Google Business Profile categories, as GCIDs. Also resolved against `countryIso`. |
| input.offeringsUrl | string | 任意 | URL of the menu, catalogue, or service list. |
| input.bookingUrl | string | 任意 | URL customers use to book an appointment. |
| input.reservationUrl | string | 任意 | URL customers use to make a reservation. |
| input.street1 | string | 任意 | Second address line (suite, unit, floor). |
| input.latitude | string | 任意 | Latitude of the location, as a string. Send with `longitude`; publishers use it when the address alone is ambiguous. |
| input.longitude | string | 任意 | Longitude of the location, as a string. Send with `latitude`. |
| input.ownerEmail | string | 任意 | Email of the location owner. Used for listing claims and verification, not for login. |
| input.ownerName | string | 任意 | Name of the location owner. |
| input.facebookUrl | string | 任意 | URL of the location's Facebook page. |
| input.twitterUrl | string | 任意 | URL of the location's X (Twitter) profile. |
| input.linkedinUrl | string | 任意 | URL of the location's LinkedIn page. |
| input.instagramUrl | string | 任意 | URL of the location's Instagram profile. |
| input.youtubeUrl | string | 任意 | URL of the location's YouTube channel. |
| input.tiktokUrl | string | 任意 | URL of the location's TikTok profile. |
| input.pinterestUrl | string | 任意 | URL of the location's Pinterest profile. |
| input.tagline | string | 任意 | Short tagline for the business. |
| input.description | string | 任意 | Business description. Published to Google Business Profile as the business description. |
| input.yearOfIncorporation | string | 任意 | Year the business was incorporated, e.g. `2014`. |
| input.googleAdsPhone | string | 任意 | Alternate phone shown on Google Ads location extensions instead of `phone`. |
| input.additionalPhones | array of strings | 任意 | Secondary phone numbers submitted to Google Business Profile. |
| input.videos | array of strings | 任意 | Video URLs for the location. |
| input.additionalCategoryIds | array of integers | 任意 | Secondary Listings API subcategory IDs, from the subcategories endpoint. Distinct from `additionalGbpSiteCategoryIds`, which takes Google GCIDs. |
| input.subCategoryId | integer | 任意 | Primary subcategory ID. Pick a valid ID from the subcategories list endpoint. |
| input.storeId | string | 任意 | Unique store code. Must be unique across the account. |
| input.enabledSiteIds | array of integers | 任意 | Site IDs to publish this location to, when you want a subset of your plan's sites. See the plan-sites endpoint for valid IDs. Omit to publish to every site in your plan. |
| input.updateOnlySiteIds | array of integers | 任意 | Restrict this update to the given site IDs. Other sites keep their current published values. |
| input.contentPreferredLanguage | string | 任意 | Preferred language for the location's published content, e.g. `ENGLISH`. |
| input.submissionDisabledSiteIds | array of integers | 任意 | Site IDs to exclude from submission. The inverse of `enabledSiteIds`, useful when you want every site in your plan except a few. |
| input.hideAddress | boolean | 任意 | Set `true` for a service-area business. ListingsAPI stores the address you send but does not submit it to publishers. |
| input.temporarilyClosed | boolean | 任意 | Set `true` to stop publishing business hours while the location is temporarily closed. |
| input.serviceItems | array of objects | 任意 | Services offered, published to Google Business Profile. |
| input.paymentMethods | array of strings | 任意 | Payment methods accepted. One or more of `VISA`, `MASTERCARD`, `AMEX`, `CASH`, `CHEQUE`, `CRYPTO`, `DINERS_CLUB`, `DISCOVER`, `FINANCING`, `INVOICE`, `TRAVELERS_CHECK`, `APPLE_PAY`, `SAMSUNG_PAY`, `PAYPAL`, `ANDROID_PAY`. |
| input.businessHours | array of objects | 任意 | Hours. Each entry is `{ day, type, slots }`, plus `specialDate` for a `SPECIAL` entry. Send the full seven-day week when you set hours. |
| input.businessHours[].day | string | 必須 | One of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY, or SPECIAL (a one-off override for the date in `specialDate`). |
| input.businessHours[].type | string | 必須 | `OPEN` or `CLOSED`. |
| input.businessHours[].specialDate | string | 任意 | Date of a one-off override, as `YYYY-MM-DD`. Set this only when `day` is `SPECIAL`. |
| input.businessHours[].slots | array of objects | 任意 | Open intervals for the day, each `{ start, end }` (e.g. `09:00am`, `05:00pm`). Use an empty array when `type` is `CLOSED`. |
| input.businessHours[].slots[].start | string | 必須 | Opening time for the interval, e.g. `09:00am`. |
| input.businessHours[].slots[].end | string | 必須 | Closing time for the interval, e.g. `05:00pm`. |
| input.moreHours | array of objects | 任意 | Additional hour sets (e.g. delivery, drive-through). Each entry is `{ hoursTypeId, moreHour }`, where `moreHour` is an array of `{ day, type, slots }` using the same shape as `businessHours` (minus `specialDate`). |
| input.serviceArea | object | 任意 | Service-area business config: `businessType`, `regionCode`, and a `placeInfos` array of `{ placeId, placeName }`. |
| input.customAttributes | array of objects | 任意 | Custom attribute values for the location. Each item is `{ slug, value }`, where `slug` identifies a custom attribute registered on your account and `value` is an array of strings. Sending a slug that is not registered returns `SY10035`. Registering a new custom attribute is not yet available through the API. |
| input.placeActionLinks | array of objects | 任意 | Google action links (ordering, delivery, takeout, reservation, appointment). Each item: `placeActionType` (enum), `uri` (string), optional `isPreferred` (boolean), optional `action` (`add`, the default, or `delete`), optional `name` (the link identifier returned by read endpoints once synced to Google). Only the links you reference are affected; links you don't include are left unchanged. See the Place Action Links guide. |
リクエストの例
そのまま貼り付けられるボディです。プレースホルダーの ID と値をご自身のものに置き換えてください。
{ "input": { "id": "TG9jYXRpb246MTgwMDI4OQ==", "phone": "5125550199", "bizUrl": "https://acmekitchen.example.com", "primaryGbpSiteCategoryId": "gcid:restaurant", "businessHours": [ { "day": "MONDAY", "type": "OPEN", "slots": [{ "start": "09:00am", "end": "05:00pm" }] }, { "day": "TUESDAY", "type": "OPEN", "slots": [{ "start": "09:00am", "end": "05:00pm" }] }, { "day": "WEDNESDAY", "type": "OPEN", "slots": [{ "start": "09:00am", "end": "05:00pm" }] }, { "day": "THURSDAY", "type": "OPEN", "slots": [{ "start": "09:00am", "end": "05:00pm" }] }, { "day": "FRIDAY", "type": "OPEN", "slots": [{ "start": "09:00am", "end": "05:00pm" }] }, { "day": "SATURDAY", "type": "OPEN", "slots": [{ "start": "10:00am", "end": "02:00pm" }] }, { "day": "SUNDAY", "type": "CLOSED", "slots": [] } ] }}レスポンス
200Location updated. `success` is true and the updated location summary is returned.
{ "data": { "updateLocation": { "clientMutationId": null, "success": true, "errors": null, "location": { "id": "TG9jYXRpb246MTgwMDI4OQ==", "databaseId": 1800289, "name": "Jenny Home", "street": "600 Congress Ave, Suite 200", "city": "Austin", "stateIso": "TX", "countryIso": "US", "postalCode": "78701", "phone": "5125550199", "storeId": null, "status": "APPROVED", "placeActionLinks": [ { "placeActionType": "FOOD_ORDERING", "uri": "https://order.example.com", "isPreferred": true, "name": null, "submissionStatus": null } ], "discoveredPlaceActionLinks": [] } } }}401Unauthenticated, missing or invalid API key.
単一の拠点を更新します。inputに含まれるフィールドのみが変更され、省略したフィールドはすべて現在の値を保持します。必須フィールドはidのみです。
ユースケース:電話番号を修正する。 idとphoneのみを送信すると、住所や営業時間を変更せずに連絡先情報を修正できます。レスポンスには更新後の拠点が返されるため、新しい値が反映されたことを確認できます。
ユースケース:1週間分の完全なスケジュールを公開する。 サンプルリクエストのように7日分のbusinessHours配列を送信して、各日の営業時間帯を設定します。休業日には{ "day": "SUNDAY", "type": "CLOSED", "slots": [] }を指定します。
営業時間のルール。
- 7日分すべてを指定してください。一部の日のみを含む週のスケジュールは拒否されます。
- 時刻は各
slotsエントリ内のstart/endを使用して指定します(例:09:00am、05:00pm)。同じ日の時間帯は重複させないでください。 - 祝日やイベントに伴う上書きは、
day: "SPECIAL"とspecialDate(YYYY-MM-DD)を含む追加エントリとして、各曜日の7つのエントリに加えて送信します。曜日のエントリの代わりに送信することはできません。 SPECIALはbusinessHours内でのみ使用してください。moreHoursのエントリにはspecialDateフィールドがないため、そこで指定されたSPECIALの日には日付が含まれません。- 配達やドライブスルーなどの補助スケジュールには、
hoursTypeIdをキーとしてmoreHoursを使用してください。
常に1週間分すべてを送信してください。 掲載先はMONDAY–SUNDAYの完全なスケジュールを想定しているため、businessHoursを設定する際は必ず7つのエントリすべてを送信し、休業日は省略せず、type: "CLOSED"(slotsは空)を指定してください。
注意点。
- 識別子フィールドは
idです(すべての読み取りエンドポイントが返すBase64 Relay IDです)。 - 検証に失敗した場合も、呼び出しは
success: falseとエラー内容の入ったerrors配列を含むHTTP 200を返すため、ステータスコードだけでなく、必ずsuccessを確認してください。
プレイスアクションリンク
placeActionLinksは、拠点のGoogleアクションボタン(注文、配達、テイクアウト、予約、来店予約)を管理します。書き込みモデルは置換ではなく、append/upsert(追加または更新)です。
action: "add"(デフォルト):新しいリンクを追加するか、保存済みリンクのuri/isPreferredをその場で更新します。action: "delete":保存済みリンクを削除し、Googleからの削除をキューに登録します。- リクエストで参照しないリンクは変更されずに保持され、リンクを省略しても削除されることはありません。
リンクの照合方法(編集・削除時):nameがある場合はそれを使用し、ない場合はplaceActionType + uriで照合します。最も正確に照合するため、読み取りエンドポイントから取得したnameがある場合はそれを含めてください。まだGoogleに同期されていないリンクにはnameがないため、placeActionType + uriで照合されます。
placeActionTypeの有効な値: APPOINTMENT、ONLINE_APPOINTMENT、DINING_RESERVATION、FOOD_ORDERING、FOOD_DELIVERY、FOOD_TAKEOUT、SHOP_ONLINE。タイプごとに優先リンクは最大1つです。
リンクのURLを変更するには、同じリクエストで古いリンクを削除し、新しいリンクを追加します:
{ "input": { "id": "TG9jYXRpb246MTgwMDI4OQ==", "placeActionLinks": [ { "placeActionType": "FOOD_ORDERING", "uri": "https://order.example.com", "name": "<link-name-if-synced>", "action": "delete" }, { "placeActionType": "FOOD_ORDERING", "uri": "https://new-order.example.com", "isPreferred": true, "action": "add" } ] }}書き込み直後は、リンクのnameとsubmissionStatusはnullであり、リンクがGoogleに同期されると値が設定されます。Google上で直接検出されたリンクがdiscoveredPlaceActionLinksの下にどのように表示されるかを含む一連の流れについては、プレイスアクションリンクのガイドを参照してください。
curl -X POST 'https://listingsapi.com/api/v4/locations/update' \ -H "Authorization: API $LISTINGSAPI_KEY" \ -H 'Content-Type: application/json' \ -d '{ "input": { "id": "TG9jYXRpb246MTgwMDI4OQ==", "phone": "5125550199", "bizUrl": "https://acmekitchen.example.com", "primaryGbpSiteCategoryId": "gcid:restaurant", "businessHours": [ { "day": "MONDAY", "type": "OPEN", "slots": [ { "start": "09:00am", "end": "05:00pm" } ] }, { "day": "TUESDAY", "type": "OPEN", "slots": [ { "start": "09:00am", "end": "05:00pm" } ] }, { "day": "WEDNESDAY", "type": "OPEN", "slots": [ { "start": "09:00am", "end": "05:00pm" } ] }, { "day": "THURSDAY", "type": "OPEN", "slots": [ { "start": "09:00am", "end": "05:00pm" } ] }, { "day": "FRIDAY", "type": "OPEN", "slots": [ { "start": "09:00am", "end": "05:00pm" } ] }, { "day": "SATURDAY", "type": "OPEN", "slots": [ { "start": "10:00am", "end": "02:00pm" } ] }, { "day": "SUNDAY", "type": "CLOSED", "slots": [] } ] } }'