POST/api/v4/locations/update

Bir konumu güncelleyin

Mevcut bir konumun yazılabilir alanlarını günceller. Yalnızca gönderdiğiniz alanlar değiştirilir.

API anahtarı gerektirir. Başlık biçimi ve anahtar yenileme için Kimlik doğrulama bölümüne bakın.

Parametreler

Gövde

Zorunlu olarak işaretlenen iç içe bir alan yalnızca üst alanını gönderdiğinizde geçerlidir. Üst alan isteğe bağlıysa ve onu göndermezseniz, zorunlu alt alanları da geçerli olmaz.

AdTürZorunluAçıklama
input.idstringzorunluThe location's Base64-encoded Relay ID to update.
input.namestringisteğe bağlıBusiness name.
input.streetstringisteğe bağlıStreet address.
input.citystringisteğe bağlıCity.
input.stateIsostringisteğe bağlıState/region ISO code.
input.postalCodestringisteğe bağlıPostal or ZIP code.
input.countryIsostringisteğe bağlıTwo-letter country ISO code.
input.phonestringisteğe bağlıPrimary phone number.
input.bizUrlstringisteğe bağlıBusiness website URL. Published to directories as the location's website.
input.primaryGbpSiteCategoryIdstringisteğe bağlıPrimary Google Business Profile category, as a GCID (e.g. `gcid:restaurant`). Resolved against `countryIso`, so send the two together.
input.additionalGbpSiteCategoryIdsarray of stringsisteğe bağlıAdditional Google Business Profile categories, as GCIDs. Also resolved against `countryIso`.
input.offeringsUrlstringisteğe bağlıURL of the menu, catalogue, or service list.
input.bookingUrlstringisteğe bağlıURL customers use to book an appointment.
input.reservationUrlstringisteğe bağlıURL customers use to make a reservation.
input.street1stringisteğe bağlıSecond address line (suite, unit, floor).
input.latitudestringisteğe bağlıLatitude of the location, as a string. Send with `longitude`; publishers use it when the address alone is ambiguous.
input.longitudestringisteğe bağlıLongitude of the location, as a string. Send with `latitude`.
input.ownerEmailstringisteğe bağlıEmail of the location owner. Used for listing claims and verification, not for login.
input.ownerNamestringisteğe bağlıName of the location owner.
input.facebookUrlstringisteğe bağlıURL of the location's Facebook page.
input.twitterUrlstringisteğe bağlıURL of the location's X (Twitter) profile.
input.linkedinUrlstringisteğe bağlıURL of the location's LinkedIn page.
input.instagramUrlstringisteğe bağlıURL of the location's Instagram profile.
input.youtubeUrlstringisteğe bağlıURL of the location's YouTube channel.
input.tiktokUrlstringisteğe bağlıURL of the location's TikTok profile.
input.pinterestUrlstringisteğe bağlıURL of the location's Pinterest profile.
input.taglinestringisteğe bağlıShort tagline for the business.
input.descriptionstringisteğe bağlıBusiness description. Published to Google Business Profile as the business description.
input.yearOfIncorporationstringisteğe bağlıYear the business was incorporated, e.g. `2014`.
input.googleAdsPhonestringisteğe bağlıAlternate phone shown on Google Ads location extensions instead of `phone`.
input.additionalPhonesarray of stringsisteğe bağlıSecondary phone numbers submitted to Google Business Profile.
input.videosarray of stringsisteğe bağlıVideo URLs for the location.
input.additionalCategoryIdsarray of integersisteğe bağlıSecondary Listings API subcategory IDs, from the subcategories endpoint. Distinct from `additionalGbpSiteCategoryIds`, which takes Google GCIDs.
input.subCategoryIdintegeristeğe bağlıPrimary subcategory ID. Pick a valid ID from the subcategories list endpoint.
input.storeIdstringisteğe bağlıUnique store code. Must be unique across the account.
input.enabledSiteIdsarray of integersisteğe bağlı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 integersisteğe bağlıRestrict this update to the given site IDs. Other sites keep their current published values.
input.contentPreferredLanguagestringisteğe bağlıPreferred language for the location's published content, e.g. `ENGLISH`.
input.submissionDisabledSiteIdsarray of integersisteğe bağlıSite IDs to exclude from submission. The inverse of `enabledSiteIds`, useful when you want every site in your plan except a few.
input.hideAddressbooleanisteğe bağlıSet `true` for a service-area business. ListingsAPI stores the address you send but does not submit it to publishers.
input.temporarilyClosedbooleanisteğe bağlıSet `true` to stop publishing business hours while the location is temporarily closed.
input.serviceItemsarray of objectsisteğe bağlıServices offered, published to Google Business Profile.
input.paymentMethodsarray of stringsisteğe bağlı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 objectsisteğe bağlı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[].daystringzorunluOne of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY, or SPECIAL (a one-off override for the date in `specialDate`).
input.businessHours[].typestringzorunlu`OPEN` or `CLOSED`.
input.businessHours[].specialDatestringisteğe bağlıDate of a one-off override, as `YYYY-MM-DD`. Set this only when `day` is `SPECIAL`.
input.businessHours[].slotsarray of objectsisteğe bağlı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[].startstringzorunluOpening time for the interval, e.g. `09:00am`.
input.businessHours[].slots[].endstringzorunluClosing time for the interval, e.g. `05:00pm`.
input.moreHoursarray of objectsisteğe bağlı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.serviceAreaobjectisteğe bağlıService-area business config: `businessType`, `regionCode`, and a `placeInfos` array of `{ placeId, placeName }`.
input.customAttributesarray of objectsisteğe bağlı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 objectsisteğe bağlı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.

Örnek istek

Yapıştırmaya hazır gövde. Yer tutucu kimlikleri ve değerleri kendi değerlerinizle değiştirin.

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

Yanıtlar

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.

Tek bir konumu günceller. Yalnızca input içinde bulunan alanlar değiştirilir; belirtmediğiniz tüm alanlar mevcut değerlerini korur. Zorunlu olan tek alan id alanıdır.

Kullanım örneği: telefon numarasını düzeltme. Adresi veya çalışma saatlerini değiştirmeden iletişim bilgilerini düzeltmek için yalnızca id ve phone gönderin. Yanıt, yeni değerlerin kaydedildiğini doğrulayabilmeniz için güncellenmiş konumu döndürür.

Kullanım örneği: haftalık çalışma saatlerinin tamamını yayınlama. Her gün için açık olunan saat aralıklarını ayarlamak üzere yedi günlük businessHours dizisini gönderin (örnek istekteki gibi). Kapalı günleri { "day": "SUNDAY", "type": "CLOSED", "slots": [] } ile işaretleyin.

Çalışma saatleri kuralları.

  • Yedi günün tamamını belirtin; eksik bir hafta reddedilir.
  • Saatler, her slots girdisinde start/end kullanılarak belirtilir (e.g, 09:00am, 05:00pm); aynı gün içindeki saat aralıkları çakışmamalıdır.
  • Tatil ve etkinlikler için normal saatlerin yerine geçecek saatler, day: "SPECIAL" ve bir specialDate (YYYY-MM-DD) içeren ek girdilerdir; haftanın yedi gününe ait girdilerle birlikte gönderilir, asla onların yerine gönderilmez.
  • SPECIAL öğesini yalnızca businessHours içinde kullanın. moreHours girdilerinde specialDate alanı bulunmadığından, buradaki bir SPECIAL günü tarih içermez.
  • İkincil çalışma saatleri (teslimat, araca servis) için moreHours kullanın ve anahtar olarak hoursTypeId belirtin.

Her zaman haftanın tamamını gönderin. Yayın platformları, MONDAY–SUNDAY aralığının tamamını kapsayan çalışma saatleri bekler; businessHours değerini her ayarladığınızda yedi girdinin tamamını gönderin ve çalışılmayan günleri atlamak yerine bu günler için type: "CLOSED" kullanın (slots boş olacak şekilde).

Dikkat edilmesi gerekenler.

  • Tanımlayıcı alanı id alanıdır (her okuma uç noktasının döndürdüğü Base64 Relay ID).
  • Doğrulama başarısız olduğunda çağrı yine de success: false ve doldurulmuş bir errors dizisiyle HTTP 200 döndürür; her zaman yalnızca durum kodunu değil, success değerini de kontrol edin.

placeActionLinks, bir konumun Google işlem düğmelerini (sipariş, teslimat, paket servis, rezervasyon, randevu) yönetir. Yazma modeli, mevcut bağlantıların tümünü değiştirmek yerine append/upsert kullanır:

  • action: "add" (varsayılan): yeni bir bağlantı ekler veya kaydedilmiş bir bağlantının uri/isPreferred değerlerini yerinde günceller.
  • action: "delete": kaydedilmiş bir bağlantıyı kaldırır ve Google'dan kaldırılmasını kuyruğa alır.
  • İstekte belirtmediğiniz bağlantılar değiştirilmeden bırakılır; bir bağlantıyı belirtmemek onu asla kaldırmaz.

Bağlantı nasıl eşleştirilir (düzenleme/silme için): varsa name ile, yoksa placeActionType + uri ile. En doğru eşleşme için, elinizde varsa name değerini (bir okuma uç noktasından alınan) ekleyin; henüz Google ile senkronize edilmemiş bir bağlantının name değeri yoktur ve bu bağlantı placeActionType + uri ile eşleştirilir.

Geçerli placeActionType değerleri: APPOINTMENT, ONLINE_APPOINTMENT, DINING_RESERVATION, FOOD_ORDERING, FOOD_DELIVERY, FOOD_TAKEOUT, SHOP_ONLINE. Her tür için en fazla bir tercih edilen bağlantı olabilir.

Bir bağlantının URL'sini değiştirme = aynı istekte eski bağlantıyı kaldırma + yeni bağlantıyı ekleme:

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

Bir yazma işleminden hemen sonra, bağlantının name ve submissionStatus alanlarının değeri null olur; bağlantı Google ile senkronize edildiğinde bu alanlar doldurulur. Doğrudan Google'da keşfedilen bağlantıların discoveredPlaceActionLinks altında nasıl göründüğü dahil tüm akış için Konum işlem bağlantıları kılavuzuna bakın.

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