rocket
ขอแนะนำ
Merchant API
ซึ่งเป็นเวอร์ชันต่อไปอย่างเป็นทางการของ Content API for Shopping
update
รับข้อมูลล่าสุด
เกี่ยวกับฟีเจอร์ใหม่ การแก้ไขข้อบกพร่อง และการอัปเดตของ Merchant API
add_alert
หมายเหตุ: Content API for Shopping จะหยุดให้บริการในวันที่ 18 สิงหาคม 2026
รหัสผลิตภัณฑ์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
รหัสผลิตภัณฑ์ประเภทต่างๆ ใน Content API for Shopping มีดังนี้
- รหัสข้อเสนอ
offerId
คือสตริงที่ผู้ขายกําหนดสําหรับผลิตภัณฑ์ รหัสนี้จะแสดงผลิตภัณฑ์แต่ละรายการ
offerId
เป็นชุดข้อเสนอที่ไม่เหมือนใครในฐานข้อมูล Merchant Center และโดยปกติแล้วจะเป็นตัวเลขตามลําดับ
offerId
อาจเป็นหมายเลข SKU ภายในที่ผู้ขายกําหนดให้กับผลิตภัณฑ์
- รหัส REST
- รหัส REST คือตัวระบุที่ไม่ซ้ํากันสําหรับผลิตภัณฑ์ที่ Google กําหนด
- รหัส REST คือ
productId
สําหรับการเรียก REST API
รหัส REST จะรวมกับรูปแบบ online:en:label:1111111111
รหัส REST ประกอบด้วย 4 ส่วนต่อไปนี้โดยคั่นด้วยโคลอน
- ช่อง ("ออนไลน์" หรือ "ท้องถิ่น")
- ภาษาของเนื้อหา (ใช้เครื่องหมาย 2 ตัว เช่น
en
หรือ fr
)
- ป้ายกํากับฟีด (อาจเป็นรหัสแบบ 2 ตัวอักษรสําหรับประเทศเป้าหมายของฟีด เช่น
US
หรือ FR
)
- รหัสข้อเสนอ
คุณรวมไว้ด้วยกันเป็น channel:contentLanguage:feedLabel:offerId
เช่น online:en:US:1111111111
- รหัสผู้ขายภายนอก (ตลาดกลาง)
ตลาดกลางต้องกําหนด external_seller_id
ให้กับข้อเสนอที่อัปโหลดไปยังบัญชีผู้ขายหลายรายการ ช่องนี้แสดงถึงผู้ขายบุคคลธรรมดา
ค่า external_seller_id
จะคํานึงถึงตัวพิมพ์เล็กและตัวพิมพ์ใหญ่ รวมถึงต้องเป็นไปตามเกณฑ์ต่อไปนี้
- ความยาว 1-50 อักขระ
- เฉพาะอักขระ ASCII ที่เป็นตัวอักษรและตัวเลขคละกัน และขีดล่าง (_), ขีดกลาง (-), จุด (.) และเครื่องหมายตัวหนอน (~)
ซึ่งไม่เหมือนกับช่อง seller_id
ภายใน
ตารางต่อไปนี้สรุปรหัสบางส่วนที่เชื่อมโยงกับผลิตภัณฑ์ได้
แอตทริบิวต์ |
คำอธิบาย |
ตัวอย่าง |
หมายเหตุ |
offerId |
รหัสที่ผู้ขายกําหนดให้กับผลิตภัณฑ์ |
1111111111 |
ประเภทข้อมูลสตริง ตัวระบุที่ไม่ซ้ํากันสําหรับข้อเสนอของผลิตภัณฑ์ |
รหัส REST |
รหัสที่ Google กําหนดให้กับผลิตภัณฑ์ ในรูปแบบ channel:contentLanguage:feedLabel:offerId |
online:en:label:1111111111 |
บัตรประจําตัวแบบเต็มซึ่งรวมถึง offerId |
productId |
ใช้เพื่ออ้างอิงถึง REST ID ในการเรียก API |
online:en:label:1111111111 |
รหัสนี้เป็น REST ID ของผลิตภัณฑ์ |
id |
ค่าเดียวกับ REST ID และ productId |
online:en:label:1111111111 |
ใช้ภายในเนื้อหา JSON ของผลิตภัณฑ์เพื่ออ้างอิงถึง productId |
external_seller_id |
รหัสผู้ขายที่ตลาดกลางเลือก |
example-Seller1 |
ต้องระบุสําหรับบัญชีผู้ขายหลายราย ต้องมีอักขระ 1-50 ตัว คำนึงถึงตัวพิมพ์เล็กหรือใหญ่ ระบบยอมรับตัวเลขและสัญลักษณ์พิเศษ _, -, . และ ~
ตัวเลข
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-13 UTC
[null,null,["อัปเดตล่าสุด 2025-08-13 UTC"],[[["\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. |"]]