管理產品
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
你可以透過 Products 子 API,以程式輔助方式管理 Google Merchant Center 中的產品目錄。你可以建立、擷取、更新及刪除產品,直接將系統與 Google 整合,彈性十足。
Merchant API 的重要概念是區分你提交的資料和 Google 使用的最終產品。這項區隔可提供更清楚的產品資料生命週期模型,讓您更精確地控管產品資訊。API 會透過兩個主要資源反映這點:
ProductInput
:
代表你提交至特定資料來源的原始產品資料。
你可以將這視為你在動態饋給檔案中上傳的資料列,或是透過 API 呼叫提交的資料,然後再由 Merchant Center 處理。您可以使用這項資源進行所有寫入作業 (insert
、patch
、delete
)。
Product
:
這是唯讀資源,代表最終處理的產品,會顯示在 Merchant Center 和 Google 平台上。在套用所有動態饋給規則和處理程序後,系統會根據一項主要資源 ProductInput
和零或多項補充資源 ProductInput
建立動態饋給。這項資源包含產品的最終狀態和任何資料品質問題。您可以使用這個資源執行所有讀取作業 (get
、list
)。
使用 ProductInput
資源提交的所有產品屬性格式和規定,都定義在產品資料規格中。
Products 子 API 的用途
您可以使用 Products 子 API 執行下列主要工作。請參閱指南,瞭解各項用途的詳細操作說明和程式碼範例。
- 新增及管理產品:瞭解如何將新產品新增至帳戶、為現有產品提供補充資料,以及刪除不再銷售的產品。
- 經常更新產品:瞭解如何有效率地部分更新經常變動的產品屬性,例如價格和供應情形。
- 列出產品資料和產品問題:瞭解如何擷取已處理的產品、查看產品在不同目的地的核准狀態,以及找出可能影響產品曝光度的資料品質問題。
事前準備
使用 Products 子 API 前,你必須先在 Merchant Center 帳戶中建立至少一個 API 資料來源。產品子 API 只能在 API
類型的資料來源中插入或更新產品。如需操作說明,請參閱「管理產品上傳的 API 資料來源」指南。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-22 (世界標準時間)。
[null,null,["上次更新時間: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."]]