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。
使用商品数据和您的商家 ID 发出 insert 请求:
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
验证您是否收到 HTTP 200 状态代码。
查看商品
使用您的商家 ID 和商品的 productId 发出 get 请求:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
验证您是否收到了 HTTP 200 状态代码以及商品的 JSON 数据。
更新商品
为商品构建新的 JSON。例如,将 JSON availability: in stock 中的单个字段更改为 availability: out of stock,以用于测试 insert 调用。
使用新商品数据和您的商家 ID 发出 insert 请求:
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
验证您是否收到 HTTP 200 状态代码。至少 5 分钟后,您可以再次发出 get 请求,以确认更新后的值 availability: out of stock 是否已应用。
删除商品
使用您的商家 ID 和商品的 productId 发出 delete 请求:
DELETE https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
验证您是否收到 HTTP 204 状态代码。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-07-06。
[null,null,["最后更新时间 (UTC):2026-07-06。"],[],["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"]]