POST/api/v4/locations/update

拠点を更新する

既存の拠点の書き込み可能なフィールドを更新します。送信したフィールドのみが変更されます。

API キーが必要です。ヘッダーの形式とキーのローテーションについては認証を参照してください。

パラメーター

ボディ

必須と示されたネストされたフィールドは、その親フィールドを送信する場合にのみ適用されます。親フィールドが任意で省略した場合、その必須の子フィールドは適用されません。

名前型必須説明
input.idstring必須The location's Base64-encoded Relay ID to update.
input.namestring任意Business name.
input.streetstring任意Street address.
input.citystring任意City.
input.stateIsostring任意State/region ISO code.
input.postalCodestring任意Postal or ZIP code.
input.countryIsostring任意Two-letter country ISO code.
input.phonestring任意Primary phone number.
input.bizUrlstring任意Business website URL. Published to directories as the location's website.
input.primaryGbpSiteCategoryIdstring任意Primary Google Business Profile category, as a GCID (e.g. `gcid:restaurant`). Resolved against `countryIso`, so send the two together.
input.additionalGbpSiteCategoryIdsarray of strings任意Additional Google Business Profile categories, as GCIDs. Also resolved against `countryIso`.
input.offeringsUrlstring任意URL of the menu, catalogue, or service list.
input.bookingUrlstring任意URL customers use to book an appointment.
input.reservationUrlstring任意URL customers use to make a reservation.
input.street1string任意Second address line (suite, unit, floor).
input.latitudestring任意Latitude of the location, as a string. Send with `longitude`; publishers use it when the address alone is ambiguous.
input.longitudestring任意Longitude of the location, as a string. Send with `latitude`.
input.ownerEmailstring任意Email of the location owner. Used for listing claims and verification, not for login.
input.ownerNamestring任意Name of the location owner.
input.facebookUrlstring任意URL of the location's Facebook page.
input.twitterUrlstring任意URL of the location's X (Twitter) profile.
input.linkedinUrlstring任意URL of the location's LinkedIn page.
input.instagramUrlstring任意URL of the location's Instagram profile.
input.youtubeUrlstring任意URL of the location's YouTube channel.
input.tiktokUrlstring任意URL of the location's TikTok profile.
input.pinterestUrlstring任意URL of the location's Pinterest profile.
input.taglinestring任意Short tagline for the business.
input.descriptionstring任意Business description. Published to Google Business Profile as the business description.
input.yearOfIncorporationstring任意Year the business was incorporated, e.g. `2014`.
input.googleAdsPhonestring任意Alternate phone shown on Google Ads location extensions instead of `phone`.
input.additionalPhonesarray of strings任意Secondary phone numbers submitted to Google Business Profile.
input.videosarray of strings任意Video URLs for the location.
input.additionalCategoryIdsarray of integers任意Secondary Listings API subcategory IDs, from the subcategories endpoint. Distinct from `additionalGbpSiteCategoryIds`, which takes Google GCIDs.
input.subCategoryIdinteger任意Primary subcategory ID. Pick a valid ID from the subcategories list endpoint.
input.storeIdstring任意Unique store code. Must be unique across the account.
input.enabledSiteIdsarray 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.updateOnlySiteIdsarray of integers任意Restrict this update to the given site IDs. Other sites keep their current published values.
input.contentPreferredLanguagestring任意Preferred language for the location's published content, e.g. `ENGLISH`.
input.submissionDisabledSiteIdsarray 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.hideAddressboolean任意Set `true` for a service-area business. ListingsAPI stores the address you send but does not submit it to publishers.
input.temporarilyClosedboolean任意Set `true` to stop publishing business hours while the location is temporarily closed.
input.serviceItemsarray of objects任意Services offered, published to Google Business Profile.
input.paymentMethodsarray 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.businessHoursarray 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[].daystring必須One of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY, or SPECIAL (a one-off override for the date in `specialDate`).
input.businessHours[].typestring必須`OPEN` or `CLOSED`.
input.businessHours[].specialDatestring任意Date of a one-off override, as `YYYY-MM-DD`. Set this only when `day` is `SPECIAL`.
input.businessHours[].slotsarray 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[].startstring必須Opening time for the interval, e.g. `09:00am`.
input.businessHours[].slots[].endstring必須Closing time for the interval, e.g. `05:00pm`.
input.moreHoursarray 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.serviceAreaobject任意Service-area business config: `businessType`, `regionCode`, and a `placeInfos` array of `{ placeId, placeName }`.
input.customAttributesarray 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.placeActionLinksarray 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 と値をご自身のものに置き換えてください。

Request body
{  "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.
Response
{  "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を変更するには、同じリクエストで古いリンクを削除し、新しいリンクを追加します:

JSON
{  "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の下にどのように表示されるかを含む一連の流れについては、プレイスアクションリンクのガイドを参照してください。

Request
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": []        }      ]    }  }'