add_alert
重要事項:Content API for Shopping 將於 2026 年 8 月 18 日終止服務。
update
掌握最新資訊
瞭解 Merchant API 的新功能、錯誤修正和更新。
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
測試產品資源
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
以下舉幾個例子,方便您使用
products 項資源。
新增產品
建構有效的 JSON
產品。
製作insert
要求
改為連結產品資料和商家 ID:
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
確認你收到 HTTP 200 狀態碼。
查看產品
製作 get
要求
這項資訊,以及產品的
productId:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
確認收到 HTTP 200 狀態碼和
產品。
更新產品
為產品建構新的 JSON。舉例來說,如果
JSON availability: in stock 到 availability: out of stock,以解決
用於測試 insert 呼叫的產品。
製作insert
要求
更新為新的產品資料,以及商家 ID:
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
確認你收到 HTTP 200 狀態碼。至少五次後
分鐘,您可以再次發出 get 要求來確認更新後的值。
已套用「availability: out of stock」。
刪除產品
製作 delete
要求
這項資訊,以及產品的
productId:
DELETE https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
確認你收到 HTTP 204 狀態碼。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2026-02-18 (世界標準時間)。
[null,null,["上次更新時間:2026-02-18 (世界標準時間)。"],[],["To add a product, create valid JSON for it, then send an `insert` request via POST with the data and merchant ID, expecting an `HTTP 200` response. To view, send a `get` request via GET with the merchant ID and product ID, confirming an `HTTP 200` status and the JSON. To update, create new JSON, make an `insert` POST request, and verify `HTTP 200` then check with `get`. To delete, send a `delete` request via DELETE with the ID, verifying an `HTTP 204` status.\n"]]