REST Resource: locations

資源:Location

位置。如要查看這些欄位的詳細說明,請參閱說明中心文章;如要查看有效業務類別清單,請參閱類別端點。

JSON 表示法
{
  "name": string,
  "languageCode": string,
  "storeCode": string,
  "title": string,
  "phoneNumbers": {
    object (PhoneNumbers)
  },
  "categories": {
    object (Categories)
  },
  "storefrontAddress": {
    object (PostalAddress)
  },
  "websiteUri": string,
  "regularHours": {
    object (BusinessHours)
  },
  "specialHours": {
    object (SpecialHours)
  },
  "serviceArea": {
    object (ServiceAreaBusiness)
  },
  "labels": [
    string
  ],
  "adWordsLocationExtensions": {
    object (AdWordsLocationExtensions)
  },
  "latlng": {
    object (LatLng)
  },
  "openInfo": {
    object (OpenInfo)
  },
  "metadata": {
    object (Metadata)
  },
  "profile": {
    object (Profile)
  },
  "relationshipData": {
    object (RelationshipData)
  },
  "moreHours": [
    {
      object (MoreHours)
    }
  ],
  "serviceItems": [
    {
      object (ServiceItem)
    }
  ]
}
欄位
name

string

ID。這個地點的 Google ID,格式為:locations/{locationId}。

languageCode

string

不可變動。地點的語言。在建立時設定,無法更新。

storeCode

string

(選用步驟) 這個地點的外部 ID,在指定帳戶中不得重複。這是將地點與您自己的記錄建立關聯的方式。

title

string

必填。地點名稱應反映商家的實際名稱,與店面、網站和文具上使用的名稱一致,且為顧客所熟知。如有其他相關資訊,可加入資源的其他欄位 (例如 Address、Categories)。請勿在名稱中加入不必要的資訊 (例如,建議使用「Google」,而非「Google Inc. - Mountain View Corporate Headquarters」)。請勿加入行銷標語、商店代碼、特殊字元、營業時間或營業/停業狀態、電話號碼、網站網址、服務/產品資訊、地點/地址或路線,或所在位置資訊 (例如「Duane Reade 內的 Chase ATM」)。

phoneNumbers

object (PhoneNumbers)

(選用步驟) 顧客可與商家聯絡的不同電話號碼。

categories

object (Categories)

(選用步驟) 描述商家的不同類別。

storefrontAddress

object (PostalAddress)

(選用步驟) 精確明白的地址,說明商家所在地點。我們不接受郵政信箱或位在偏遠地區的信箱地址。目前,您最多可以在地址中指定五個 addressLines 值。這個欄位僅適用於有店面的商家。請勿為 CUSTOMER_LOCATION_ONLY 類型的地點設定這個欄位,否則系統會捨棄提供的值。

websiteUri

string

(選用步驟) 這個商家的網址。如果可以,請使用代表這個個別商家地點的網址,而非代表所有地點或品牌的通用網站/網址。

regularHours

object (BusinessHours)

(選用步驟) 商家的營業時間。

specialHours

object (SpecialHours)

(選用步驟) 商家的特殊營業時間。通常包括節慶營業時間,以及其他非正常營業時間。這些時間會覆寫正常營業時間。必須先設定一般營業時間,才能設定這個欄位。

serviceArea

object (ServiceAreaBusiness)

(選用步驟) 無店面區域商家會在顧客所在地提供服務。如果這個商家是無店面區域商家,這個欄位會說明商家的服務範圍。

labels[]

string

(選用步驟) 一組任意形式的字串,可用來標記商家。這些標籤不會向使用者顯示,只有您看得到。每個標籤的長度必須介於 1 到 255 個字元之間。

adWordsLocationExtensions

object (AdWordsLocationExtensions)

(選用步驟) AdWords 中顯示的其他資訊。

latlng

object (LatLng)

(選用步驟) 使用者提供的經緯度。建立地點時,如果提供的地址成功進行地理編碼,系統會忽略這個欄位。只有在建立期間接受使用者提供的 latlng 值,或透過 Google 商家檔案網站更新 latlng 值時,系統才會在 GET 要求中傳回這個欄位。只有核准的用戶端可以更新這個欄位。

openInfo

object (OpenInfo)

(選用步驟) 指出地點目前是否營業中的標記。

metadata

object (Metadata)

僅供輸出。其他使用者無法編輯的資訊。

profile

object (Profile)

(選用步驟) 用自己的話描述商家,並與使用者分享商家和產品/服務的獨特故事。

除了住宿類別 (例如飯店、汽車旅館、旅館) 以外,所有類別都必須填寫這個欄位。

relationshipData

object (RelationshipData)

(選用步驟) 與這個地點相關的所有地點和連鎖店。

moreHours[]

object (MoreHours)

(選用步驟) 商家不同部門或特定顧客的詳細營業時間。

serviceItems[]

object (ServiceItem)

(選用步驟) 商家支援的服務清單。服務可以是剪髮、安裝熱水器等。重複的服務項目會自動移除。

方法

delete

刪除位置。

get

傳回商家最後設定的指定位置。

getAttributes

擷取商家上次設定的地點屬性。

getGoogleUpdated

傳回 Google 地圖和 Google 搜尋上顯示的指定地點。

patch

更新指定位置。

updateAttributes

更新指定地點的屬性。