Tổng quan về CSS API
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Bạn có thể sử dụng CSS API để quản lý CSS và kiểm soát danh mục sản phẩm CSS.
CSS API là một phiên bản được thiết kế lại của các tính năng CSS trong Content API for Shopping.
CSS API so với Merchant API
Hiểu rõ sự khác biệt giữa CSS API và Merchant API là yếu tố then chốt để quản lý sản phẩm một cách hiệu quả. Mỗi API phục vụ một mục đích riêng và hoạt động trên các loại tài khoản và không gian nhận dạng khác nhau:
CSS API (phiên bản 1): Sử dụng API này cho tất cả các chức năng liên quan đến việc quản lý tài khoản CSS và các sản phẩm CSS được liên kết. API này sử dụng tên máy chủ css.googleapis.com
và yêu cầu phải có Mã miền CSS cho các thao tác về sản phẩm.
- Ví dụ:
POST https://css.googleapis.com/v1/accounts/{cssDomainId}/cssProductInputs:insert
Merchant API
(phiên bản 1): Sử dụng API này cho tất cả chức năng liên quan đến tài khoản Merchant Center tiêu chuẩn và sản phẩm của tài khoản đó. API này sử dụng tên máy chủ merchantapi.googleapis.com
và yêu cầu phải có mã nhận dạng Merchant Center tiêu chuẩn.
- Ví dụ:
POST https://merchantapi.googleapis.com/v1/accounts/{merchantId}/productInputs:insert
Điểm mấu chốt: Không sử dụng CSS Domain ID với Merchant API cho các điểm cuối sản phẩm và không sử dụng Merchant Center ID với các điểm cuối sản phẩm CSS API. Việc sử dụng sai mã nhận dạng với API không chính xác sẽ dẫn đến lỗi.
CSS API và Merchant API cùng nhau thay thế Content API for Shopping (v2.1) cũ. Bạn không nên sử dụng API này nữa.
Sau đây là một số lý do để nâng cấp lên CSS API:
Hãy xem bài viết Bắt đầu sử dụng để biết thêm thông tin.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-13 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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."]]