如要標記與商家帳戶的關係,購物合作夥伴必須先使用 accounts.link
方法傳送連結要求。
連結要求包含 linkedAccountId
,可識別接收要求的商家,且 action
類型為 request
。每個連結也應指定一組 services
,列出合作夥伴為商家提供的功能。支援的 services
值如下:
服務 | 說明 |
---|---|
shoppingAdsProductManagement |
購物廣告的產品資料管理服務 |
shoppingActionsProductManagement |
Buy on Google (原為購物行動) 的產品資料管理服務 |
shoppingActionsOrderManagement |
Buy on Google (前稱「購物行動」) 的訂單管理服務 |
此外,要求也必須包含有效的 linkType
,說明提出要求的購物合作夥伴類型。系統會為購物合作夥伴指派下列其中一個標籤,合作夥伴在呼叫 API 時,應在 linkType
欄位中使用指定標籤。
有效的 linkTypes |
---|
channelPartner |
eCommercePlatform |
範例
下列 API 呼叫會從合作夥伴的帳戶 (123456789
) 向商家傳送連結要求,商家 ID 為 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"
}
下一節說明如何取得現有連結的清單。