連結商家檔案

如要將店面商品目錄資料提供給 Merchant Center,您必須先指定 Merchant Center 所負責的業務您可以取得 可能透過 Content API 擷取商家檔案的營業地點群組,但你必須 必須先要求商家檔案的存取權。

要求商家檔案存取權

如要要求商家檔案存取權,請使用 liasettings.requestgmbaccess敬上 方法:

POST https://shoppingcontent.googleapis.com/content/v2.1/12345/liasettings/67890/requestgmbaccess?gmbEmail=admin@example.com

如本範例所示,gmbEmail 查詢參數指定 該商家檔案管理員的地址。

呼叫此方法後,指定的管理員會收到電子郵件通知 請對方接受或拒絕存取要求。這項要求將於下列日期後到期: 如果管理員未採取任何行動,則為 7 天。

列出可用的營業地點群組

獲得存取權後,您就能查看哪些商家 呼叫 liasettings.getaccessiblegmbaccounts敬上 方法:

GET https://shoppingcontent.googleapis.com/content/v2.1/12345/liasettings/67890/accessiblegmbaccounts

Response:
200 OK
{
 
"kind": "content#liasettingsGetAccessibleGmbAccountsResponse",
 
"accountId": 67890,
 
"gmbAccounts": [{
   
"type" : "user",
   
"email" : "admin@example.com",
   
"name" : "admin@example.com",
   
"listingCount": 82
 
},
 
{
   
"type" : "business",
   
"email" : "california@example.com",
   
"name" : "Golden-State",
   
"listingCount" : 20
 
},
 
{
   
"type" : "business",
   
"email" : "florida@example.com",
   
"name" : "Sunshine-State",
   
"listingCount" : 15
 
},
 
{
   
"type" : "business",
   
"email" : "newyork@example.com",
   
"name" : "Empire-State",
   
"listingCount" : 25
 
}]
}

指定 Merchant Center 帳戶的營業地點群組

列出可能的營業地點群組清單後,接著請設定 googleMyBusinessLink 欄位的 有 Accounts 項相關聯的資源 將 Merchant Center 帳戶連結至所需帳戶舉例來說 Center 67890 會包含加州商家的產品 Accounts.update即可設定該條件 每個 ACL 都由一或多個項目組成 而這些項目包含兩項資訊

PUT https://shoppingcontent.googleapis.com/content/v2/12345/accounts/67890
{
 
"googleMyBusinessLink" : {
   
"gmbEmail": "california@example.com"
 
}
}

Response:
200 OK
{
 
"kind": "content#account",
 
"id": 67890,
 
"googleMyBusinessLink" : {
   
"gmbEmail": "california@example.com",
   
"status" : "active"
 
}
}

設定 googleMyBusinessLink 欄位不需要任何手動操作 驗證狀態,連結狀態就會立即生效。

提交產品和商品目錄資料

Merchant Center 已連結營業地點群組後 提供這些商家的店面產品和店面商品目錄資料。 如要執行這項作業,請使用與 products.insert 你 用於上傳線上產品和商品目錄資料 針對 products.insert,您應指定 local 的管道,而非 online