商品 ID
以下是 Content API for Shopping 的各種產品 ID:
- 優惠 ID
offerId
是由商家指派給產品的字串。這個 ID 代表個別產品。
offerId
專用於 Merchant Center 資料庫中的一組商品,通常為數字序號。
offerId
可以是商家指派給產品的內部 SKU 編號。
- REST ID
- REST ID 是 Google 指派給產品的專屬 ID。
- REST ID 是 REST API 呼叫的
productId
。
REST ID 會以 online:en:label:1111111111
格式匯總。REST ID 由以下 4 個部分組成,以冒號分隔:
- 管道 (「線上」或「本地」)
- 內容語言 (使用 2 個字母的標示,例如
en
或 fr
)
- 動態饋給標籤 (可以是動態饋給指定國家/地區的兩字母代碼,例如
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 |
字串資料類型,是產品優惠的專屬 ID。 |
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 個字元之間。需區分大小寫,可接受數字和特殊字元 _、-、. 和 ~。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-07-03 (世界標準時間)。
[null,null,["上次更新時間: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"]]