rocket
隆重推出
Merchant API
- Content API for Shopping 的官方後繼產品。
update
掌握最新資訊
瞭解 Merchant API 的新功能、錯誤修正和更新。
add_alert
注意:Content API for Shopping 將於 2026 年 8 月 18 日停用。
要求連結
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
如要標記與商家帳戶的關係,購物合作夥伴必須先使用 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"
}
下一節說明如何取得現有連結的清單。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-13 (世界標準時間)。
[null,null,["上次更新時間:2025-08-13 (世界標準時間)。"],[[["\u003cp\u003eThe Merchant API is the new version of the Content API for Shopping and represents the future of the platform.\u003c/p\u003e\n"],["\u003cp\u003eTo establish a relationship, partners must send a linking request using the \u003ccode\u003eaccounts.link\u003c/code\u003e method, specifying the desired services and partner type.\u003c/p\u003e\n"],["\u003cp\u003eThe link request requires approval from the receiving merchant before it becomes fully established.\u003c/p\u003e\n"],["\u003cp\u003ePartners can be categorized as either \u003ccode\u003echannelPartner\u003c/code\u003e or \u003ccode\u003eeCommercePlatform\u003c/code\u003e and must use their designated \u003ccode\u003elinkType\u003c/code\u003e in the API call.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eservices\u003c/code\u003e field allows partners to indicate the specific features they offer to merchants, such as product and order management.\u003c/p\u003e\n"]]],["The Merchant API beta, a new version of the Content API for Shopping, is introduced. Shopping partners must use the `accounts.link` method to request a link to a merchant account. This requires specifying the `linkedAccountId` of the merchant, the `linkType` (e.g., `channelPartner`, `eCommercePlatform`), the provided `services` (e.g., `shoppingAdsProductManagement`), and an `action` of `request`. The link requires the receiving merchant's approval to be established. An example API call is provided.\n"],null,["# Request links\n\nTo flag a relationship with a merchant account, a Shopping partner must first\nuse the [`accounts.link`](/shopping-content/reference/rest/v2.1/accounts/link)\nmethod to send a linking request.\n| **Note:** The link is not fully established until the receiving merchant approves the request.\n\nThe link request contains a [`linkedAccountId`](/shopping-content/reference/rest/v2.1/accounts/link#linkedAccountId)\nthat identifies the merchant receiving the request and has an [`action`](/shopping-content/reference/rest/v2.1/accounts/link#action)\ntype of `request`. Each link should also specificy a set of [`services`](/shopping-content/reference/rest/v2.1/accounts/link#linkType)\nthat enumerates which features the partner provides to the merchant. The following\n[`services`](/shopping-content/reference/rest/v2.1/accounts/link#linkType) values\nare supported.\n\n| Service | Description |\n|------------------------------------|--------------------------------------------------------------------------------|\n| `shoppingAdsProductManagement` | Product data management for Shopping ads |\n| `shoppingActionsProductManagement` | Product data management for Buy on Google (formerly known as Shopping Actions) |\n| `shoppingActionsOrderManagement` | Order management for Buy on Google (formerly known as Shopping Actions) |\n\nAdditionally, a request must also contain a valid [`linkType`](/shopping-content/reference/rest/v2.1/accounts/link#linkType)\nthat describes the type of Shopping partner making the request. Shopping\npartners are assigned one of the following labels and should use their designated\nlabel in the `linkType` field when calling the API.\n\n| Valid linkTypes |\n|---------------------|\n| `channelPartner` |\n| `eCommercePlatform` |\n\nExample\n-------\n\nThe following API call sends a link request from a partner's account\n`123456789` to a merchant with `linkedAccountId` of `\"98765\"`.\n\nThe `\"eCommercePlatform\"` `linkType` identifies the partner as an e-commerce\nplatform. The `services` list indicates that the partner provides\n`\"shoppingAdsProductManagement\"` (product data management for Shopping ads) and\n`\"shoppingActionsOrderManagement\"` (order management for Buy on Google, formerly\nknown as Shopping Actions) features. \n\n POST https://shoppingcontent.googleapis.com/content/v2.1/123456789/accounts/123456789/link\n {\n \"linkedAccountId\": \"98765\",\n \"linkType\": \"eCommercePlatform\",\n \"services\": [\"shoppingAdsProductManagement\", \"shoppingActionsOrderManagement\"],\n \"action\": \"request\"\n }\n\nThe [next section](/shopping-content/guides/flagging/list) describes how to get a list of existing links."]]