為盡可能確保商家檔案準確無誤,Google 會採用多種來源的資訊,像是使用者回報和授權內容等。如果有人回報業主提供的資訊不正確,Google 會通知商家資訊擁有者。商家資訊擁有者可以接受或拒絕更新。
商家資訊擁有者可以透過「我的商家」商家資訊 API 檢查這些更新,確保商家資訊正確無誤。本指南說明如何接受或拒絕更新。
如要管理 Google 更新,請完成下列步驟:
找出待更新的營業地點
如要接受或拒絕更新,請先找出可用的 Google 更新。如要取得地點的 Google 更新資訊,最好的方法是透過 Cloud Pub/Sub 管理即時通知。如果Pub/Sub 主題收到 GOOGLE_UPDATE 通知,表示有變更項目待您審查。通知中的 locationName 欄位會提供有 Google 資訊更新的地點資源名稱。
或者,您也可以查看 locations.get 呼叫,並檢查 Metadata 是否有 hasGoogleUpdated 旗標。如果 "isGoogleUpdated": true,與這個位置相關聯的地點 ID 有更新。
要求
以下是 locations.get 要求範例:
GET
https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}
要求
以下是 locations.get 回應範例:
{
"name": "locations/{locationId}",
"title": "Test Business",
"phoneNumbers": {
"primaryPhone": "02 9374 4000"
},
...
"metadata": {
"hasGoogleUpdated": true,
...
}
...
}查看更新後的欄位
如要查看有 Google 資訊更新的特定欄位,請呼叫 locations.getGoogleUpdated。
這個方法會在回應主體中傳回兩個重要遮罩:
diffMask:表示放送資料 (顧客在 Google 地圖和搜尋上看到的內容) 與本地偏好值不同。這通常是由 Google 更新或使用者原創內容所致。您必須接受或拒絕這些欄位,才能解決差異。pendingMask:表示你先前提交的更新仍在處理中,尚未發布至 Google 地圖和搜尋。您不需要對這些欄位採取行動。
要求
以下是 locations.getGoogleUpdated 要求範例:
GET
https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}:googleUpdated
回應
以下是 locations.getGoogleUpdated 回應範例。「phoneNumbers.primaryPhone」phoneNumbers.primaryPhone欄位會顯示可用的更新。這項回應中的值是建議的更新值:
{
"location": {
"name": "locations/{locationId}",
"locationName": "Test Business",
"phoneNumbers": {
"primaryPhone": "+1 111 111 1111"
},
...
},
"diffMask": "phoneNumbers.primaryPhone"
}接受或拒絕更新
如要解決 diffMask 中列出的欄位,您必須使用 locations.patch 要求接受或拒絕更新:
- 接受更新:使用
getGoogleUpdated回應中傳回的新值修補位置資訊。這會更新本機記錄,使其與放送資料一致。 - 拒絕更新:使用原始偏好值修補位置資訊。這會透過更新管道重新聲明偏好的資料,並覆寫服務資料。
在這兩種情況下,請設定 updateMask,涵蓋要解決的欄位。
接受要求
以下是 locations.patch 要求範例:
PATCH
https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}?updateMask=phoneNumbers.primaryPhone
{
"phoneNumbers": {
"primaryPhone": "+1 111 111 1111"
},
}
回應
以下是 locations.patch 回應範例:
{
"name": "locations/{locationId}",
"locationName": "Test Business",
"phoneNumbers": {
"primaryPhone": "+1 111 111 1111"
},
...
}拒絕要求
以下是 locations.patch 要求範例:
PATCH
https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}?updateMask=phoneNumbers.primaryPhone
{
"name": "locations/{locationId}",
"locationName": "Test Business",
"phoneNumbers": {
"primaryPhone": "222 222 2222"
},
...
}
回應
以下是 locations.patch 回應範例:
{
"name": "locations/{locationId}",
"locationName": "Test Business",
"phoneNumbers": {
"primaryPhone": "222 222 2222"
},
...
}查看結果
如果位置資訊修補成功,locations.getGoogleUpdated 回應中的 diffMask 欄位會顯示 "diffMask": "" 值。此外,Metadata 中的 "hasGoogleUpdated" 旗標會將值顯示為 false,或不顯示任何值。
如果欄位值不清楚,請與支援團隊聯絡,並提供 getGoogleUpdated 的要求和回應。要求必須包含回應,才能進行 locations.patch 呼叫、修補程式呼叫和 getGoogleUpdated 呼叫。