Method: accounts.products.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
列出 Merchant Center 账号中已处理的商品。响应中包含的项目数量可能少于 pageSize 指定的数量。依赖于 pageToken 来确定是否有更多要请求的项。
插入、更新或删除商品输入后,可能需要几分钟时间才能检索到更新后的处理商品。
HTTP 请求
GET https://merchantapi.googleapis.com/products/v1beta/{parent=accounts/*}/products
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
必需。要为其列出已处理商品的账号。格式:accounts/{account}
|
查询参数
参数 |
pageSize |
integer
要返回的商品数量上限。服务返回的值可能小于此值。最大值为 250;大于 250 的值将被强制转换为 250。如果未指定,则会返回最大数量的商品。
|
pageToken |
string
从之前的 products.list 调用接收的页面令牌。利用其进行后续页面检索。 进行分页时,提供给 products.list 的所有其他参数必须与提供页面令牌的调用匹配。
|
响应正文
products.list 方法的响应消息。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"products": [
{
object (Product )
}
],
"nextPageToken": string
} |
字段 |
products[] |
object (Product )
指定账号中已处理的商品。这些是应用规则和补充数据源后处理的产品。
|
nextPageToken |
string
可作为 pageToken 发送并用于检索下一页的令牌。如果省略此字段,则不存在后续页面。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/content
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-01-23。
[null,null,["最后更新时间 (UTC):2025-01-23。"],[[["\u003cp\u003eLists processed products within your Merchant Center account, potentially requiring pagination for comprehensive retrieval.\u003c/p\u003e\n"],["\u003cp\u003eAllows you to control the number of products returned per request using \u003ccode\u003epageSize\u003c/code\u003e, with a maximum limit of 250.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes \u003ccode\u003epageToken\u003c/code\u003e for navigating through multiple pages of results when the product list exceeds the specified \u003ccode\u003epageSize\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e scope for accessing and retrieving product data.\u003c/p\u003e\n"],["\u003cp\u003eProvides product data in JSON format, including an array of \u003ccode\u003eproducts\u003c/code\u003e and a \u003ccode\u003enextPageToken\u003c/code\u003e for pagination.\u003c/p\u003e\n"]]],["This document details how to list processed products in a Merchant Center account using the `products.list` method. Key actions include sending a `GET` request to a specific URL with required `parent` path parameter (account ID) and optional `pageSize` and `pageToken` query parameters for pagination. The request body must be empty. The successful response includes a list of `products` and `nextPageToken` for subsequent pages. An OAuth scope is needed to get authorized. It might take several minutes for updates to be reflected.\n"],null,["# Method: accounts.products.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListProductsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists the processed products in your Merchant Center account. The response might contain fewer items than specified by `pageSize`. Rely on `pageToken` to determine if there are more items to be requested.\n\nAfter inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved.\n\n### HTTP request\n\n`GET https://merchantapi.googleapis.com/products/v1beta/{parent=accounts/*}/products`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The account to list processed products for. Format: `accounts/{account}` |\n\n### Query parameters\n\n| Parameters ||\n|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of products to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the default page size of 25 products will be returned. |\n| `pageToken` | `string` A page token, received from a previous `products.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `products.list` must match the call that provided the page token. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for the products.list method.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"products\": [ { object (/merchant/api/reference/rest/products_v1beta/accounts.products#Product) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `products[]` | `object (`[Product](/merchant/api/reference/rest/products_v1beta/accounts.products#Product)`)` The processed products from the specified account. These are your processed products after applying rules and supplemental data sources. |\n| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]