POST/api/v4/locations/update

Einen Standort aktualisieren

Aktualisiert beschreibbare Felder eines vorhandenen Standorts. Nur die von Ihnen gesendeten Felder werden geändert.

Erfordert einen API-Schlüssel. Format des Headers und Schlüsselrotation finden Sie unter Authentifizierung.

Parameter

Body

Ein als erforderlich markiertes verschachteltes Feld gilt nur, wenn Sie das übergeordnete Feld senden. Ist das übergeordnete Feld optional und lassen Sie es weg, gelten seine erforderlichen Unterfelder nicht.

NameTypErforderlichBeschreibung
input.idstringerforderlichThe location's Base64-encoded Relay ID to update.
input.namestringoptionalBusiness name.
input.streetstringoptionalStreet address.
input.citystringoptionalCity.
input.stateIsostringoptionalState/region ISO code.
input.postalCodestringoptionalPostal or ZIP code.
input.countryIsostringoptionalTwo-letter country ISO code.
input.phonestringoptionalPrimary phone number.
input.bizUrlstringoptionalBusiness website URL. Published to directories as the location's website.
input.primaryGbpSiteCategoryIdstringoptionalPrimary Google Business Profile category, as a GCID (e.g. `gcid:restaurant`). Resolved against `countryIso`, so send the two together.
input.additionalGbpSiteCategoryIdsarray of stringsoptionalAdditional Google Business Profile categories, as GCIDs. Also resolved against `countryIso`.
input.offeringsUrlstringoptionalURL of the menu, catalogue, or service list.
input.bookingUrlstringoptionalURL customers use to book an appointment.
input.reservationUrlstringoptionalURL customers use to make a reservation.
input.street1stringoptionalSecond address line (suite, unit, floor).
input.latitudestringoptionalLatitude of the location, as a string. Send with `longitude`; publishers use it when the address alone is ambiguous.
input.longitudestringoptionalLongitude of the location, as a string. Send with `latitude`.
input.ownerEmailstringoptionalEmail of the location owner. Used for listing claims and verification, not for login.
input.ownerNamestringoptionalName of the location owner.
input.facebookUrlstringoptionalURL of the location's Facebook page.
input.twitterUrlstringoptionalURL of the location's X (Twitter) profile.
input.linkedinUrlstringoptionalURL of the location's LinkedIn page.
input.instagramUrlstringoptionalURL of the location's Instagram profile.
input.youtubeUrlstringoptionalURL of the location's YouTube channel.
input.tiktokUrlstringoptionalURL of the location's TikTok profile.
input.pinterestUrlstringoptionalURL of the location's Pinterest profile.
input.taglinestringoptionalShort tagline for the business.
input.descriptionstringoptionalBusiness description. Published to Google Business Profile as the business description.
input.yearOfIncorporationstringoptionalYear the business was incorporated, e.g. `2014`.
input.googleAdsPhonestringoptionalAlternate phone shown on Google Ads location extensions instead of `phone`.
input.additionalPhonesarray of stringsoptionalSecondary phone numbers submitted to Google Business Profile.
input.videosarray of stringsoptionalVideo URLs for the location.
input.additionalCategoryIdsarray of integersoptionalSecondary Listings API subcategory IDs, from the subcategories endpoint. Distinct from `additionalGbpSiteCategoryIds`, which takes Google GCIDs.
input.subCategoryIdintegeroptionalPrimary subcategory ID. Pick a valid ID from the subcategories list endpoint.
input.storeIdstringoptionalUnique store code. Must be unique across the account.
input.enabledSiteIdsarray of integersoptionalSite 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 integersoptionalRestrict this update to the given site IDs. Other sites keep their current published values.
input.contentPreferredLanguagestringoptionalPreferred language for the location's published content, e.g. `ENGLISH`.
input.submissionDisabledSiteIdsarray of integersoptionalSite IDs to exclude from submission. The inverse of `enabledSiteIds`, useful when you want every site in your plan except a few.
input.hideAddressbooleanoptionalSet `true` for a service-area business. ListingsAPI stores the address you send but does not submit it to publishers.
input.temporarilyClosedbooleanoptionalSet `true` to stop publishing business hours while the location is temporarily closed.
input.serviceItemsarray of objectsoptionalServices offered, published to Google Business Profile.
input.paymentMethodsarray of stringsoptionalPayment 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 objectsoptionalHours. Each entry is `{ day, type, slots }`, plus `specialDate` for a `SPECIAL` entry. Send the full seven-day week when you set hours.
input.businessHours[].daystringerforderlichOne of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY, or SPECIAL (a one-off override for the date in `specialDate`).
input.businessHours[].typestringerforderlich`OPEN` or `CLOSED`.
input.businessHours[].specialDatestringoptionalDate of a one-off override, as `YYYY-MM-DD`. Set this only when `day` is `SPECIAL`.
input.businessHours[].slotsarray of objectsoptionalOpen intervals for the day, each `{ start, end }` (e.g. `09:00am`, `05:00pm`). Use an empty array when `type` is `CLOSED`.
input.businessHours[].slots[].startstringerforderlichOpening time for the interval, e.g. `09:00am`.
input.businessHours[].slots[].endstringerforderlichClosing time for the interval, e.g. `05:00pm`.
input.moreHoursarray of objectsoptionalAdditional 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.serviceAreaobjectoptionalService-area business config: `businessType`, `regionCode`, and a `placeInfos` array of `{ placeId, placeName }`.
input.customAttributesarray of objectsoptionalCustom 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 objectsoptionalGoogle 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.

Beispielanfrage

Body zum direkten Einfügen. Ersetzen Sie Platzhalter-IDs und -Werte durch Ihre eigenen.

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

Antworten

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.

Aktualisiert einen einzelnen Standort. Nur die in input enthaltenen Felder werden geändert; alle ausgelassenen Felder behalten ihren aktuellen Wert. id ist das einzige Pflichtfeld.

Anwendungsfall: eine Telefonnummer korrigieren. Senden Sie nur id und phone, um Kontaktdaten zu korrigieren, ohne die Adresse oder die Öffnungszeiten zu ändern. Die Antwort gibt den aktualisierten Standort zurück, sodass Sie prüfen können, ob die neuen Werte übernommen wurden.

Anwendungsfall: einen vollständigen Wochenplan veröffentlichen. Senden Sie das businessHours-Array für alle sieben Tage (wie in der Beispielanfrage), um die Öffnungsintervalle pro Tag festzulegen. Kennzeichnen Sie geschlossene Tage mit { "day": "SUNDAY", "type": "CLOSED", "slots": [] }.

Regeln für Öffnungszeiten.

  • Geben Sie alle sieben Tage an; eine unvollständige Woche wird abgelehnt.
  • Zeitangaben verwenden start/end innerhalb jedes slots-Eintrags (e.g, 09:00am, 05:00pm); Intervalle innerhalb eines Tages dürfen sich nicht überschneiden.
  • Abweichende Zeiten für Feiertage und Veranstaltungen sind zusätzliche Einträge mit day: "SPECIAL" und einem specialDate (YYYY-MM-DD), die zusammen mit den sieben Wochentagseinträgen gesendet werden, niemals an deren Stelle.
  • Verwenden Sie SPECIAL nur in businessHours. moreHours-Einträge haben kein specialDate-Feld, daher hat ein SPECIAL-Tag dort kein Datum.
  • Verwenden Sie moreHours für zusätzliche Zeitpläne (Lieferung, Drive-through), mit hoursTypeId als Schlüssel.

Senden Sie immer die vollständige Woche. Plattformen erwarten einen vollständigen Zeitplan von MONDAY bis SUNDAY; senden Sie alle sieben Einträge, wann immer Sie businessHours festlegen, und verwenden Sie für Tage ohne Betrieb type: "CLOSED" (mit leerem slots), anstatt den Tag auszulassen.

Fallstricke.

  • Das Identifikatorfeld ist id (die Base64 Relay ID, die jeder Lese-Endpunkt zurückgibt).
  • Bei einem Validierungsfehler gibt der Aufruf dennoch HTTP 200 mit success: false und einem gefüllten errors-Array zurück; prüfen Sie immer success, nicht nur den Statuscode.

placeActionLinks verwaltet die Google-Aktionsschaltflächen eines Standorts (Bestellung, Lieferung, Abholung, Reservierung, Terminvereinbarung). Das Schreibmodell ist append/upsert, kein Ersetzen:

  • action: "add" (Standard): fügt einen neuen Link hinzu oder aktualisiert uri/isPreferred eines gespeicherten Links direkt.
  • action: "delete": entfernt einen gespeicherten Link und stellt dessen Entfernung von Google in die Warteschlange.
  • Links, auf die Sie in der Anfrage nicht verweisen, bleiben unverändert; das Auslassen eines Links entfernt ihn niemals.

So wird ein Link zugeordnet (zum Bearbeiten/Löschen): anhand von name, sofern vorhanden, andernfalls anhand von placeActionType + uri. Geben Sie name (aus einem Lese-Endpunkt) an, wenn Ihnen dieser Wert vorliegt, um eine möglichst genaue Zuordnung zu erzielen; ein Link, der noch nicht mit Google synchronisiert wurde, hat kein name und wird anhand von placeActionType + uri zugeordnet.

Gültige Werte für placeActionType: APPOINTMENT, ONLINE_APPOINTMENT, DINING_RESERVATION, FOOD_ORDERING, FOOD_DELIVERY, FOOD_TAKEOUT, SHOP_ONLINE. Höchstens ein bevorzugter Link pro Typ.

Die URL eines Links ändern = den alten Link entfernen + den neuen Link in derselben Anfrage hinzufügen:

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

Unmittelbar nach einem Schreibvorgang haben name und submissionStatus eines Links den Wert null; sie werden befüllt, sobald der Link mit Google synchronisiert wird. Den vollständigen Ablauf finden Sie im Leitfaden zu Aktionslinks für Standorte, einschließlich einer Beschreibung, wie direkt auf Google entdeckte Links unter discoveredPlaceActionLinks erscheinen.

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