ภาพรวม CSS API
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คุณใช้ CSS API เพื่อจัดการ CSS และควบคุมพอร์ตโฟลิโอผลิตภัณฑ์ CSS ได้
CSS API เป็นการออกแบบฟีเจอร์ CSS ใหม่ใน Content API for
Shopping
CSS API กับ Merchant API
การทำความเข้าใจความแตกต่างระหว่าง CSS API กับ Merchant API เป็นสิ่งสำคัญ
ในการจัดการผลิตภัณฑ์อย่างมีประสิทธิภาพ API แต่ละรายการมีวัตถุประสงค์ที่แตกต่างกันและ
ทํางานในบัญชีประเภทต่างๆ และพื้นที่รหัสที่แตกต่างกัน ดังนี้
CSS API (v1): ใช้ API นี้สำหรับฟังก์ชันการทำงานทั้งหมดที่เกี่ยวข้องกับการจัดการ
บัญชี CSS และผลิตภัณฑ์ CSS ที่เชื่อมโยง API นี้ใช้css.googleapis.com
ชื่อโฮสต์และต้องมีรหัสโดเมน CSS สำหรับการดำเนินการเกี่ยวกับผลิตภัณฑ์
- ตัวอย่าง:
POST https://css.googleapis.com/v1/accounts/{cssDomainId}/cssProductInputs:insert
Merchant API
(v1): ใช้ API นี้สำหรับฟังก์ชันการทำงานทั้งหมดที่เกี่ยวข้องกับ
บัญชี Merchant Center มาตรฐานและผลิตภัณฑ์ของบัญชี API นี้ใช้ชื่อโฮสต์ merchantapi.googleapis.com
และต้องมีรหัส Merchant
Center มาตรฐาน
- ตัวอย่าง:
POST https://merchantapi.googleapis.com/v1/accounts/{merchantId}/productInputs:insert
ข้อควรทราบ: อย่าใช้รหัสโดเมน CSS กับ Merchant API สำหรับปลายทางผลิตภัณฑ์
และอย่าใช้รหัส Merchant Center กับปลายทางผลิตภัณฑ์ CSS API
การใช้รหัสที่ไม่ถูกต้องกับ API ที่ไม่ถูกต้องจะทำให้เกิดข้อผิดพลาด
CSS API และ Merchant API จะทำงานร่วมกันเพื่อแทนที่ Content API for Shopping
(v2.1) เวอร์ชันเก่า ซึ่งไม่ควรใช้อีกต่อไป
เหตุผลบางประการที่ควรอัปเกรดเป็น CSS API มีดังนี้
ดูข้อมูลเพิ่มเติมได้ที่เริ่มต้นใช้งาน
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-13 UTC
[null,null,["อัปเดตล่าสุด 2025-08-13 UTC"],[[["\u003cp\u003eThe CSS API enables managing CSS and controlling your CSS Products portfolio.\u003c/p\u003e\n"],["\u003cp\u003eThe CSS API offers new features, improved alignment with Google's API improvement proposals, and updated documentation and samples.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading from the Content API for Shopping to the CSS API is recommended.\u003c/p\u003e\n"]]],[],null,["# CSS API overview\n\nYou can use the CSS API to manage your CSS and control your CSS Products\nportfolio.\n\nThe CSS API is a redesign of the CSS features in [Content API for\nShopping](/shopping-content).\n\nCSS API versus Merchant API\n---------------------------\n\nUnderstanding the distinction between the CSS API and the Merchant API is key\nto effectively managing your products. Each API serves a different purpose and\noperates on different account types and ID spaces:\n\n- **CSS API (v1):** Use this API for all functionalities related to managing\n CSS accounts and their associated CSS products. This API uses the\n `css.googleapis.com` hostname and requires a **CSS Domain ID** for product\n operations.\n\n - Example: `POST https://css.googleapis.com/v1/accounts/{cssDomainId}/cssProductInputs:insert`\n- **[Merchant API](https://developers.google.com/merchant/api/overview)\n (v1):** Use this API for all functionalities related to\n standard Merchant Center accounts and their products. This API uses the\n `merchantapi.googleapis.com` hostname and requires a standard **Merchant\n Center ID**.\n\n - Example: `POST https://merchantapi.googleapis.com/v1/accounts/{merchantId}/productInputs:insert`\n\n**Key takeaway:** Don't use a CSS Domain ID with the Merchant API for product\nendpoints, and don't use a Merchant Center ID with the CSS API product\nendpoints. Using the wrong ID with the wrong API will result in errors.\n\nThe CSS API and Merchant API together replace the older Content API for Shopping\n(v2.1), which should no longer be used.\n\nHere are some reasons to upgrade to the CSS API:\n\n- New features.\n- Improved alignment with Google's [API improvement proposals](//google.aip.dev/).\n- Updated documentation and [samples](/comparison-shopping-services/api/code-samples).\n\nSee [Get started](/comparison-shopping-services/api/guides/quickstart) for more\ninformation."]]