rocket
隆重推出
Merchant API - Content API for Shopping 的正式替代方案。
update
获取最新资讯,了解 Merchant API 的新功能、问题修复和更新。
add_alert
注意:Content API for Shopping 将于 2026 年 8 月 18 日停用。
产品 ID
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
以下是 Content API for Shopping 中的不同商品 ID:
- 优惠 ID
offerId
是商家分配给商品的字符串。此 ID 代表一个产品。
offerId
是 Merchant Center 数据库中的一组商品独有的,通常是数字序列号。
offerId
可以是商家分配给商品的内部 SKU 编号。
- REST ID
- REST ID 是 Google 所分配商品的唯一标识符。
- REST ID 是 REST API 调用的
productId
。
REST ID 是采用 online:en:label:1111111111
格式的汇总。REST ID 由以下 4 个部分组成,各个部分之间用英文冒号分隔开:
- 渠道(“在线”或“本地”)
- 内容语言(使用 2 个字母表示,例如
en
或 fr
)
- Feed 标签(可以是 Feed 的目标国家/地区的两个字母的代码,例如
US
或 FR
)
- 优惠 ID
将以下代码作为 channel:contentLanguage:feedLabel:offerId
组合在一起,例如 online:en:US:1111111111
。
- 外部卖家 ID(购物平台)
购物平台必须为上传到多卖家帐号的优惠分配 external_seller_id
。此字段表示个人卖家。
external_seller_id
值区分大小写,且必须满足以下条件:
- 1-50 个字符
- 只有字母数字字符 ASCII 字符、下划线 (_)、连字符 (-)、英文句点 (.) 和波浪线 (~)
这与内部 seller_id
字段不同。
下表总结了可与商品相关联的部分 ID:
属性 |
说明 |
示例 |
备注 |
offerId |
商家分配给商品的 ID。 |
1111111111 |
字符串数据类型,商品优惠的唯一标识符。 |
REST ID |
Google 分配给商品的 ID。格式为 channel:contentLanguage:feedLabel:offerId 。 |
online:en:label:1111111111 |
完整 ID,包括 offerId 。 |
productId |
用于在 API 调用中引用 REST ID。 |
online:en:label:1111111111 |
这是产品的 REST ID。 |
id |
与 REST ID 和 productId 的值相同。 |
online:en:label:1111111111 |
在商品的 JSON 正文内使用,用于引用其 productId 。 |
external_seller_id |
由市场选择的卖方 ID。 |
example-Seller1 |
如果是多卖家帐号,则必须提供此属性。必须为 1-50 个字符。区分大小写。接受数字以及特殊字符 _、-、. 和 ~。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 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 product data integration with Google.\u003c/p\u003e\n"],["\u003cp\u003eThe beta version of the Merchant API is now available for developers to explore and help shape its future development.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can learn more about the benefits and features of the Merchant API, including how it can enhance integrations, in the official announcement blog post.\u003c/p\u003e\n"],["\u003cp\u003eProducts in the Merchant API are identified using various IDs, such as \u003ccode\u003eofferId\u003c/code\u003e, REST ID, \u003ccode\u003eproductId\u003c/code\u003e, and \u003ccode\u003eexternal_seller_id\u003c/code\u003e, each with specific characteristics and usage contexts.\u003c/p\u003e\n"],["\u003cp\u003eA comprehensive table provides detailed explanations and examples of different product ID attributes, outlining their purpose and format.\u003c/p\u003e\n"]]],["The beta version of the Merchant API, the new Content API for Shopping, is introduced. Merchants assign an `offerId` to products. Google assigns a unique REST ID in the format `channel:contentLanguage:feedLabel:offerId`; this is also the `productId` and `id` in API calls. Marketplaces assign `external_seller_id` to offers for multi-seller accounts, it has specific format requirements. The Merchant API offers integration improvements; details on this and providing feedback are available via a linked article.\n"],null,["# Product IDs\n\nHere are the different kinds of product IDs in the Content API for Shopping:\n\nOffer ID\n: An `offerId` is a string assigned to a product by a merchant. This ID\n represents an individual product.\n: `offerId` is unique to the set of offers in the Merchant Center database, and\n is usually a numeric sequential number.\n: `offerId` can be an internal SKU number that a merchant assigns to the product.\n\nREST ID\n: A REST ID is the unique identifier for a product assigned by Google.\n: REST ID is the `productId` for REST API calls.\n\n: REST IDs are aggregates with the format `online:en:label:1111111111`. The\n REST ID consists of the following 4 parts, separated by colons:\n\n 1. Channel (\"online\" or \"local\")\n 2. Content Language (using the 2-letter designation, for example `en` or `fr`)\n 3. Feed label (might be the two-letter code for the feed's target country, for example `US` or `FR`)\n 4. Offer ID\n\n: You put this together as `channel:contentLanguage:feedLabel:offerId`, for\n example, `online:en:US:1111111111`.\n\nExternal Seller ID (Marketplaces)\n\n: [Marketplaces](//support.google.com/merchants/answer/6363319)\n must assign an `external_seller_id` to offers uploaded to a multi-seller\n account. This field represents an individual seller.\n\n `external_seller_id` values are case-sensitive, and must meet the following\n criteria:\n\n - 1-50 characters in length\n - Only alphanumeric ASCII characters, and underscore (_), hyphen (-), period (.), and tilde (\\~)\n\n This isn't the same as the internal\n [`seller_id`](/shopping-content/reference/rest/v2.1/accounts) field.\n\nThe following table summarizes some of the IDs that can be associated with a\nproduct:\n\n| Attribute | Description | Example | Notes |\n|----------------------|---------------------------------------------------------------------------------------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| `offerId` | An ID assigned to a product by a merchant. | `1111111111` | String data type, unique identifier for a product's offer. |\n| REST ID | An ID assigned to a product by Google. In the format `channel:contentLanguage:feedLabel:offerId`. | `online:en:label:1111111111` | Full ID including `offerId`. |\n| `productId` | Used to refer to the REST ID in API calls. | `online:en:label:1111111111` | This is the REST ID of a product. |\n| `id` | Same value as REST ID and `productId`. | `online:en:label:1111111111` | Used inside JSON body of a product to refer to its `productId`. |\n| `external_seller_id` | A seller ID chosen by the Marketplace. | `example-Seller1` | Required for multi-seller accounts. Must be 1-50 characters. Case-sensitive. Digits, and special characters _, -, ., and \\~ are accepted. |"]]