产品 ID
以下是 Content API for Shopping 中不同类型的商品 ID:
- 优惠 ID
offerId
是商家分配给商品的字符串。此 ID 表示单个商品。
offerId
是 Merchant Center 数据库中的一组商品的唯一 ID,通常是数字序列号。
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):2024-07-03。
[null,null,["最后更新时间 (UTC):2024-07-03。"],[[["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"]]