管理您的商品
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 Products 子 API,您可以以编程方式管理 Google Merchant Center 中的商品目录。您可以创建、检索、更新和删除商品,从而灵活地将您的系统直接与 Google 集成。
Merchant API 的一个关键概念是您提交的数据与 Google 使用的最终商品之间的区别。这种分离可提供更清晰的商品数据生命周期模型,让您能够更精确地控制商品信息。该 API 通过两个主要资源反映了这一点:
ProductInput
:表示您向特定数据源提交的原始商品数据。
您可以将此视为您在 Feed 文件中上传的行,或您通过 API 调用提交的数据(在 Merchant Center 进行任何处理之前)。您可以使用此资源执行所有写入操作(insert
、patch
、delete
)。
Product
:这是一个只读资源,表示最终经过处理的商品在 Merchant Center 和 Google 各平台上的显示效果。它是在应用所有 Feed 规则和处理后,根据一个主要 ProductInput
和零个或多个补充 ProductInput
资源构建而成。此资源包含商品的最终状态和任何数据质量问题。您可以使用此资源执行所有读取操作(get
、list
)。
使用 ProductInput
资源提交的所有商品属性的格式和要求均在商品数据规范中定义。
您可以利用 Products 子 API 执行的操作
借助 Products 子 API,您可以执行以下关键任务。请参阅相关指南,详细了解每种使用场景的说明和代码示例。
- 添加和管理商品:了解如何向账号添加新商品、为现有商品提供补充数据,以及删除您不再销售的商品。
- 频繁更新商品数据:了解如何高效地部分更新经常变化的商品属性,例如价格和库存状况。
- 列出商品数据和商品问题:了解如何检索已处理的商品、查看商品在不同目标平台上的审批状态,以及确定可能影响商品展示的任何数据质量问题。
准备工作
在使用 Products 子 API 之前,您必须在 Merchant Center 账号中至少创建一个 API 数据源。商品子 API 只能在类型为 API
的数据源中插入或更新商品。如需查看相关说明,请参阅管理用于上传商品的 API 数据源指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-22。
[null,null,["最后更新时间 (UTC):2025-08-22。"],[[["\u003cp\u003eThe Merchant Products API allows you to programmatically manage your product data, including inserting, updating, retrieving, and deleting products.\u003c/p\u003e\n"],["\u003cp\u003eProducts are managed through two key resources: \u003ccode\u003eproductInputs\u003c/code\u003e (representing input data) and \u003ccode\u003eproducts\u003c/code\u003e (representing processed products in the Shopping database).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eproductInputs\u003c/code\u003e can be primary or supplementary and are used to construct the final \u003ccode\u003eproduct\u003c/code\u003e that appears in your online or local store catalogs.\u003c/p\u003e\n"],["\u003cp\u003eThe API offers advantages over file-based uploads, such as faster response times and real-time updates.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the API, ensure you have a data source set up and are familiar with Shopping Ads and free listings policies.\u003c/p\u003e\n"]]],["The Merchant Products API allows programmatic product data management via `productInputs` and `products` resources. Actions include inserting `productInput` data with required fields like `channel`, `offerId`, `contentLanguage`, and `feedLabel` using `accounts.productInputs.insert`. Processed products can be retrieved using `accounts.products.get` and listed with `accounts.products.list`. Product inputs are deleted using `accounts.productInputs.delete`, specifying the data source. Products are built from primary and supplemental data sources, enabling real-time catalog management. You can use Batch mode to manage many products.\n"],null,["# Manage your products\n\nThe Products sub-API lets you programmatically manage your product inventory in\nGoogle Merchant Center. You can create, retrieve, update, and delete products,\ngiving you the flexibility to integrate your systems directly with Google.\n\nA key concept in Merchant API is the distinction between the data you submit and\nthe final product that Google uses. This separation provides a clearer model of\nthe product data lifecycle and gives you more precise control over your product\ninformation. The API reflects this with two main resources:\n\n- **[`ProductInput`](/merchant/api/reference/rest/products_v1/accounts.productInputs#ProductInput):**\n This represents the raw product data you submit to a specific data source.\n Think of this as the row you upload in a feed file or the data you submit\n with an API call before any Merchant Center processing happens. You use this\n resource for all **write** operations (`insert`, `patch`, `delete`).\n\n- **[`Product`](/merchant/api/reference/rest/products_v1/accounts.products#Product):**\n This is a read-only resource that represents the final, processed product as\n it appears in Merchant Center and on Google surfaces. It is built from one\n primary `ProductInput` and zero or more supplemental `ProductInput`\n resources after all feed rules and processing have been applied. This\n resource includes the product's final status and any data quality issues.\n You use this resource for all **read** operations (`get`, `list`).\n\nThe format and requirements for all product attributes submitted using the\n`ProductInput` resource are defined in the [Product data\nspecification](https://support.google.com/merchants/answer/7052112).\n\nWhat you can do with the Products sub-API\n-----------------------------------------\n\nThe Products sub-API lets you to perform the following key tasks. Explore the\nguides for detailed instructions and code samples for each use case.\n\n- [Add and manage products](/merchant/api/guides/products/add-manage): Learn how to add new products to your account, provide supplemental data for existing ones, and delete products you no longer sell.\n- [Make frequent updates to your\n products](/merchant/api/guides/products/frequent-updates): Discover how to make efficient, partial updates to product attributes that change often, such as price and availability.\n- [List your products data and product\n issues](/merchant/api/guides/products/list-products-data-issues): Find out how to retrieve your processed products, check their approval status for different destinations, and identify any data quality issues that may be affecting their visibility.\n\nBefore you begin\n----------------\n\nBefore using the Products sub-API, you must create at least one API data source\nin your Merchant Center account. The Products sub-API can only insert or update\nproducts in data sources of type `API`. For instructions, see the [Manage API\ndata sources for product uploads](/merchant/api/guides/data-sources/api-sources) guide."]]