rocket
隆重推出
Merchant API - Content API for Shopping 的正式替代方案。
update
获取最新资讯,了解 Merchant API 的新功能、问题修复和更新。
add_alert
注意:Content API for Shopping 将于 2026 年 8 月 18 日停用。
列出链接
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
购物合作伙伴账号和个人商家账号都可以与多个其他账号之间存在多个被标记的关联。
listlinks
方法会返回发出 API 调用的 Merchant Center 账号的所有此类关联的列表。它不需要任何参数,并且使用 HTTP GET
请求进行调用。
服务状态
列出链接时,响应会针对链接中的每个 service
显示一个 status
。商家可以选择批准列出的所有服务,也可以仅批准请求中提议的部分服务。
服务最初处于 pending
状态,直到商家明确批准后才会生效。获得批准后,服务会处于 active
状态。
如果还存在其他 pending
或 active
服务,已移除的服务将显示 inactive
状态。移除链接中的所有服务后,listlinks
方法将不再返回该链接。
示例请求
如需列出合作伙伴 123456789
发送的关联请求,请使用 listlinks
方法发送不带任何参数的 GET
请求。
GET https://shoppingcontent.googleapis.com/content/v2.1/123456789/accounts/123456789/listlinks
示例响应
在此示例中,商家 98765
尚未批准请求,因此各个服务的状态为 pending
。
{
"linkedAccountId": "98765",
"services": [
{
"service": "shoppingAdsProductManagement",
"status": "pending"
},
{
"service": "shoppingActionsOrderManagement",
"status": "pending"
}
]
}
下一部分将介绍如何批准关联请求。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-13。
[null,null,["最后更新时间 (UTC):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\u003eThe \u003ccode\u003elistlinks\u003c/code\u003e method allows retrieval of all flagged links between accounts, providing insight into account relationships.\u003c/p\u003e\n"],["\u003cp\u003eEach service within a link has a status, starting as \u003ccode\u003epending\u003c/code\u003e, transitioning to \u003ccode\u003eactive\u003c/code\u003e upon approval, and ultimately becoming \u003ccode\u003einactive\u003c/code\u003e when removed.\u003c/p\u003e\n"],["\u003cp\u003eA simple HTTP GET request to the \u003ccode\u003elistlinks\u003c/code\u003e endpoint is sufficient to retrieve link information without requiring any parameters.\u003c/p\u003e\n"]]],["The beta version of the Merchant API, the new Content API for Shopping, is introduced. The `listlinks` method retrieves all links between merchant accounts without parameters via a `GET` request. Each service within a link has a `status`: `pending` (awaiting merchant approval), `active` (approved), or `inactive` (removed, but other services remain). Once all services are removed, the link is no longer listed. A `GET` request example and the `listlinks` method's response format are provided.\n"],null,["# List links\n\nBoth Shopping partners and individual merchant accounts can have multiple\nflagged links between their accounts and others.\nThe [`listlinks`](/shopping-content/reference/rest/v2.1/accounts/listlinks) method\nreturns a list of all these links for the merchant center account\nmaking the API call. It does not require any parameters and is invoked using an\nHTTP `GET` request.\n\nService status\n--------------\n\nWhen listing links, responses will show a `status` for each individual `service`\nwithin a link. Merchants have the option to either approve all listed services\nor only a subset of those proposed in the request.\n\nServices start out in a `pending` status until explicitly [approved by a\nmerchant](/shopping-content/guides/flagging/approve). After they are approved, services have an `active` status.\n\nRemoved services will show a status of `inactive` if there are other `pending`\nor `active` services also present. Once all services comprising a link are\nremoved, the link will no longer be returned by the\n[`listlinks`](/shopping-content/reference/rest/v2.1/accounts/listlinks) method.\n\nExample request\n---------------\n\nTo list the link request sent by partner `123456789`, send a `GET`\nrequest with no parameters using the [`listlinks`](/shopping-content/reference/rest/v2.1/accounts/listlinks) method. \n\n GET https://shoppingcontent.googleapis.com/content/v2.1/123456789/accounts/123456789/listlinks\n\nExample response\n----------------\n\nIn this example, the merchant `98765` has yet to approve the request, so the\nindividual services have a `pending` status. \n\n {\n \"linkedAccountId\": \"98765\",\n \"services\": [\n {\n \"service\": \"shoppingAdsProductManagement\",\n \"status\": \"pending\"\n },\n {\n \"service\": \"shoppingActionsOrderManagement\",\n \"status\": \"pending\"\n }\n ]\n }\n\nThe [next section](/shopping-content/guides/flagging/approve) describes how to approve a linking request."]]