POST/api/v4/locations/update

Actualizar una ubicación

Actualiza los campos que se pueden modificar de una ubicación existente. Solo se cambian los campos que envías.

Requiere una clave de API. Consulta Autenticación para conocer el formato del encabezado y la rotación de claves.

Parámetros

Cuerpo

Un campo anidado marcado como obligatorio solo se aplica cuando envías su campo principal. Si el campo principal es opcional y lo omites, sus campos hijos obligatorios no se aplican.

NombreTipoObligatorioDescripción
input.idstringobligatorioThe 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[].daystringobligatorioOne of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY, or SPECIAL (a one-off override for the date in `specialDate`).
input.businessHours[].typestringobligatorio`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[].startstringobligatorioOpening time for the interval, e.g. `09:00am`.
input.businessHours[].slots[].endstringobligatorioClosing 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.

Solicitud de ejemplo

Cuerpo listo para pegar. Sustituye los ID y valores de ejemplo por los tuyos.

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

Respuestas

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.

Actualiza una sola ubicación. Solo se modifican los campos presentes en input; todo lo que omitas conserva su valor actual. id es el único campo obligatorio.

Caso de uso: corregir un número de teléfono. Envía solo id y phone para corregir los datos de contacto sin modificar la dirección ni el horario. La respuesta devuelve la ubicación actualizada para que puedas confirmar que se han aplicado los nuevos valores.

Caso de uso: publicar un horario semanal completo. Envía el array businessHours de siete días (como en la solicitud de ejemplo) para establecer los intervalos de apertura de cada día. Marca los días de cierre con { "day": "SUNDAY", "type": "CLOSED", "slots": [] }.

Reglas del horario comercial.

  • Incluye los siete días; se rechaza cualquier semana incompleta.
  • Las horas usan start/end dentro de cada entrada de slots (e.g, 09:00am, 05:00pm); los intervalos de un mismo día no deben solaparse.
  • Las excepciones por festivos y eventos son entradas adicionales con day: "SPECIAL" y un specialDate (YYYY-MM-DD), que se envían junto con las siete entradas de los días de la semana, nunca en su lugar.
  • Usa SPECIAL solo en businessHours. Las entradas de moreHours no tienen el campo specialDate, por lo que un día SPECIAL en ellas no lleva fecha.
  • Usa moreHours para los horarios secundarios (entrega a domicilio, atención desde el vehículo), con hoursTypeId como clave.

Envía siempre la semana completa. Las plataformas de publicación esperan un horario completo de MONDAY a SUNDAY; envía las siete entradas siempre que establezcas businessHours, usando type: "CLOSED" (con slots vacío) para los días sin actividad en lugar de omitir el día.

Aspectos que debes tener en cuenta.

  • El campo identificador es id (el ID de Relay en Base64 que devuelve cada endpoint de lectura).
  • Si la validación falla, la llamada sigue devolviendo HTTP 200 con success: false y un array errors con elementos; comprueba siempre success, no solo el código de estado.

placeActionLinks gestiona los botones de acción de Google de una ubicación (pedidos, entrega a domicilio, recogida, reservas, citas). El modelo de escritura es append/upsert, no de sustitución:

  • action: "add" (valor predeterminado): añade un enlace nuevo o actualiza uri/isPreferred de un enlace guardado sin sustituirlo.
  • action: "delete": elimina un enlace guardado y pone en cola su eliminación de Google.
  • Los enlaces que no incluyas en la solicitud se mantienen sin cambios; omitir un enlace nunca lo elimina.

Cómo se identifica un enlace (para editarlo o eliminarlo): por name si está presente; de lo contrario, por placeActionType + uri. Incluye name (obtenido de un endpoint de lectura) cuando lo tengas para identificarlo con la mayor precisión posible; un enlace que aún no se ha sincronizado con Google no tiene name y se identifica por placeActionType + uri.

Valores válidos de placeActionType: APPOINTMENT, ONLINE_APPOINTMENT, DINING_RESERVATION, FOOD_ORDERING, FOOD_DELIVERY, FOOD_TAKEOUT, SHOP_ONLINE. Como máximo, un enlace preferido por tipo.

Cambiar la URL de un enlace = eliminar el antiguo + añadir el nuevo en la misma solicitud:

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

Justo después de una escritura, name y submissionStatus de un enlace tienen el valor null; se rellenan una vez que el enlace se sincroniza con Google. Consulta la guía de enlaces de acción de la ubicación para conocer el flujo completo, incluido cómo aparecen en discoveredPlaceActionLinks los enlaces descubiertos directamente en Google.

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