POST/api/v4/locations/update

Atualizar um local

Atualiza os campos graváveis de um local existente. Apenas os campos que você envia são alterados.

Requer uma chave de API. Consulte Autenticação para ver o formato do cabeçalho e a rotação de chaves.

Parâmetros

Corpo

Um campo aninhado marcado como obrigatório só se aplica quando você envia o campo pai. Se o campo pai for opcional e você o omitir, os campos filhos obrigatórios não se aplicam.

NomeTipoObrigatórioDescrição
input.idstringobrigatórioThe location's Base64-encoded Relay ID to update.
input.namestringopcionalBusiness name.
input.streetstringopcionalStreet address.
input.citystringopcionalCity.
input.stateIsostringopcionalState/region ISO code.
input.postalCodestringopcionalPostal or ZIP code.
input.countryIsostringopcionalTwo-letter country ISO code.
input.phonestringopcionalPrimary phone number.
input.bizUrlstringopcionalBusiness website URL. Published to directories as the location's website.
input.primaryGbpSiteCategoryIdstringopcionalPrimary Google Business Profile category, as a GCID (e.g. `gcid:restaurant`). Resolved against `countryIso`, so send the two together.
input.additionalGbpSiteCategoryIdsarray of stringsopcionalAdditional Google Business Profile categories, as GCIDs. Also resolved against `countryIso`.
input.offeringsUrlstringopcionalURL of the menu, catalogue, or service list.
input.bookingUrlstringopcionalURL customers use to book an appointment.
input.reservationUrlstringopcionalURL customers use to make a reservation.
input.street1stringopcionalSecond address line (suite, unit, floor).
input.latitudestringopcionalLatitude of the location, as a string. Send with `longitude`; publishers use it when the address alone is ambiguous.
input.longitudestringopcionalLongitude of the location, as a string. Send with `latitude`.
input.ownerEmailstringopcionalEmail of the location owner. Used for listing claims and verification, not for login.
input.ownerNamestringopcionalName of the location owner.
input.facebookUrlstringopcionalURL of the location's Facebook page.
input.twitterUrlstringopcionalURL of the location's X (Twitter) profile.
input.linkedinUrlstringopcionalURL of the location's LinkedIn page.
input.instagramUrlstringopcionalURL of the location's Instagram profile.
input.youtubeUrlstringopcionalURL of the location's YouTube channel.
input.tiktokUrlstringopcionalURL of the location's TikTok profile.
input.pinterestUrlstringopcionalURL of the location's Pinterest profile.
input.taglinestringopcionalShort tagline for the business.
input.descriptionstringopcionalBusiness description. Published to Google Business Profile as the business description.
input.yearOfIncorporationstringopcionalYear the business was incorporated, e.g. `2014`.
input.googleAdsPhonestringopcionalAlternate phone shown on Google Ads location extensions instead of `phone`.
input.additionalPhonesarray of stringsopcionalSecondary phone numbers submitted to Google Business Profile.
input.videosarray of stringsopcionalVideo URLs for the location.
input.additionalCategoryIdsarray of integersopcionalSecondary Listings API subcategory IDs, from the subcategories endpoint. Distinct from `additionalGbpSiteCategoryIds`, which takes Google GCIDs.
input.subCategoryIdintegeropcionalPrimary subcategory ID. Pick a valid ID from the subcategories list endpoint.
input.storeIdstringopcionalUnique store code. Must be unique across the account.
input.enabledSiteIdsarray of integersopcionalSite 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 integersopcionalRestrict this update to the given site IDs. Other sites keep their current published values.
input.contentPreferredLanguagestringopcionalPreferred language for the location's published content, e.g. `ENGLISH`.
input.submissionDisabledSiteIdsarray of integersopcionalSite IDs to exclude from submission. The inverse of `enabledSiteIds`, useful when you want every site in your plan except a few.
input.hideAddressbooleanopcionalSet `true` for a service-area business. ListingsAPI stores the address you send but does not submit it to publishers.
input.temporarilyClosedbooleanopcionalSet `true` to stop publishing business hours while the location is temporarily closed.
input.serviceItemsarray of objectsopcionalServices offered, published to Google Business Profile.
input.paymentMethodsarray of stringsopcionalPayment 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 objectsopcionalHours. Each entry is `{ day, type, slots }`, plus `specialDate` for a `SPECIAL` entry. Send the full seven-day week when you set hours.
input.businessHours[].daystringobrigatórioOne of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY, or SPECIAL (a one-off override for the date in `specialDate`).
input.businessHours[].typestringobrigatório`OPEN` or `CLOSED`.
input.businessHours[].specialDatestringopcionalDate of a one-off override, as `YYYY-MM-DD`. Set this only when `day` is `SPECIAL`.
input.businessHours[].slotsarray of objectsopcionalOpen intervals for the day, each `{ start, end }` (e.g. `09:00am`, `05:00pm`). Use an empty array when `type` is `CLOSED`.
input.businessHours[].slots[].startstringobrigatórioOpening time for the interval, e.g. `09:00am`.
input.businessHours[].slots[].endstringobrigatórioClosing time for the interval, e.g. `05:00pm`.
input.moreHoursarray of objectsopcionalAdditional 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.serviceAreaobjectopcionalService-area business config: `businessType`, `regionCode`, and a `placeInfos` array of `{ placeId, placeName }`.
input.customAttributesarray of objectsopcionalCustom 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 objectsopcionalGoogle 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.

Exemplo de requisição

Corpo pronto para colar. Substitua os IDs e valores de exemplo pelos seus.

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

Respostas

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.

Atualiza um único local. Apenas os campos presentes em input são modificados; tudo o que você omitir mantém seu valor atual. id é o único campo obrigatório.

Caso de uso: corrigir um número de telefone. Envie apenas id e phone para corrigir os dados de contato sem alterar o endereço ou os horários. A resposta retorna o local atualizado para que você possa confirmar que os novos valores foram aplicados.

Caso de uso: publicar uma programação semanal completa. Envie o array businessHours com os sete dias (como na requisição de exemplo) para definir os intervalos de funcionamento por dia. Marque os dias sem funcionamento com { "day": "SUNDAY", "type": "CLOSED", "slots": [] }.

Regras de horário de funcionamento.

  • Informe todos os sete dias; uma semana parcial é rejeitada.
  • Os horários usam start/end dentro de cada entrada de slots (e.g, 09:00am, 05:00pm); os intervalos de um mesmo dia não devem se sobrepor.
  • As exceções para feriados e eventos são entradas extras com day: "SPECIAL" e um specialDate (YYYY-MM-DD), enviadas junto com as sete entradas dos dias da semana, nunca em substituição a elas.
  • Use SPECIAL apenas em businessHours. As entradas de moreHours não têm o campo specialDate, portanto um dia SPECIAL nessas entradas não contém uma data.
  • Use moreHours para horários secundários (entrega, drive-through), com hoursTypeId como chave.

Sempre envie a semana completa. As plataformas de publicação esperam uma programação completa de MONDAY–SUNDAY; envie todas as sete entradas sempre que você definir businessHours, usando type: "CLOSED" (com slots vazio) para os dias sem funcionamento em vez de omitir o dia.

Pontos de atenção.

  • O campo identificador é id (o ID Relay em Base64 retornado por todos os endpoints de leitura).
  • Em caso de falha de validação, a chamada ainda retorna HTTP 200 com success: false e um array errors preenchido; sempre verifique success, não apenas o código de status.

placeActionLinks gerencia os botões de ação de um local no Google (pedidos, entrega, retirada, reserva, agendamento). O modelo de gravação é append/upsert, não de substituição:

  • action: "add" (o padrão): adiciona um novo link ou atualiza uri/isPreferred de um link salvo, mantendo o mesmo registro.
  • action: "delete": remove um link salvo e coloca sua remoção do Google na fila.
  • Os links que você não referencia na requisição são mantidos sem alterações; omitir um link nunca o remove.

Como um link é identificado (para edição/exclusão): por name, se presente; caso contrário, por placeActionType + uri. Inclua name (obtido de um endpoint de leitura) quando você o tiver, para uma correspondência mais precisa; um link que ainda não foi sincronizado com o Google não tem name e é identificado por placeActionType + uri.

Valores válidos de placeActionType: APPOINTMENT, ONLINE_APPOINTMENT, DINING_RESERVATION, FOOD_ORDERING, FOOD_DELIVERY, FOOD_TAKEOUT, SHOP_ONLINE. No máximo um link preferencial por tipo.

Alterar a URL de um link = remover o antigo + adicionar o novo na mesma requisição:

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

Logo após uma gravação, name e submissionStatus de um link são null; eles são preenchidos assim que o link é sincronizado com o Google. Consulte o guia de links de ação do local para ver o fluxo completo, incluindo como os links descobertos diretamente no Google aparecem em 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": []        }      ]    }  }'