如要標記與商家帳戶的關係,購物合作夥伴必須先使用 accounts.link
方法傳送連結要求。
連結要求含有 linkedAccountId
,可識別接收要求的商家,且 action
類型為 request
。每個連結也應提供一組 services
,列舉合作夥伴提供給商家哪些功能。系統支援下列 services
值。
服務 | 說明 |
---|---|
shoppingAdsProductManagement |
購物廣告的產品資料管理服務 |
shoppingActionsProductManagement |
Buy on Google (舊稱 Shopping Actions) 的產品資料管理服務 |
shoppingActionsOrderManagement |
Buy on Google (舊稱「購物行動」) 的訂單管理服務 |
此外,要求也必須包含有效的 linkType
,說明提出要求的購物合作夥伴類型。購物合作夥伴會獲派下列其中一個標籤,且在呼叫 API 時,應在 linkType
欄位中使用指定標籤。
有效的 linkTypes |
---|
channelPartner |
eCommercePlatform |
範例
下列 API 呼叫會從合作夥伴的帳戶 123456789
傳送連結要求給 linkedAccountId
為 "98765"
的商家。
"eCommercePlatform"
linkType
會將合作夥伴識別為電子商務平台。services
清單代表合作夥伴提供 "shoppingAdsProductManagement"
(購物廣告的產品資料管理) 和 "shoppingActionsOrderManagement"
(適用於 Buy on Google 的訂單管理服務,舊稱「購物行動」) 功能。
POST https://shoppingcontent.googleapis.com/content/v2.1/123456789/accounts/123456789/link
{
"linkedAccountId": "98765",
"linkType": "eCommercePlatform",
"services": ["shoppingAdsProductManagement", "shoppingActionsOrderManagement"],
"action": "request"
}
下一節將說明如何取得現有連結清單。