产品 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
的汇总 ID。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 |
包含 offerId 的完整 ID。 |
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-06-19。
[null,null,["最后更新时间 (UTC):2025-06-19。"],[[["The Merchant API is the new version of the Content API for Shopping and represents the future of product data integration with Google."],["The beta version of the Merchant API is now available for developers to explore and help shape its future development."],["Developers can learn more about the benefits and features of the Merchant API, including how it can enhance integrations, in the official announcement blog post."],["Products in the Merchant API are identified using various IDs, such as `offerId`, REST ID, `productId`, and `external_seller_id`, each with specific characteristics and usage contexts."],["A comprehensive table provides detailed explanations and examples of different product ID attributes, outlining their purpose and format."]]],["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"]]