Method: accounts.dataSources.fetch
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
立即(即使在提取时间表之外)对 Merchant Center 账号中的数据源执行数据提取。如果您每天需要调用此方法多次,则应改用商品服务来更新商品数据。此方法仅适用于设置了文件输入的数据源。
HTTP 请求
POST https://merchantapi.googleapis.com/datasources/v1beta/{name=accounts/*/dataSources/*}:fetch
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。要提取的数据源资源的名称。格式:accounts/{account}/dataSources/{datasource}
|
响应正文
如果成功,响应正文将为空的 JSON 对象。
授权范围
需要以下 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\u003eFetches product data immediately from a specified Merchant Center Account data source.\u003c/p\u003e\n"],["\u003cp\u003eThis method is suitable for infrequent use (less than daily) and requires a data source with a file input.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003ePOST\u003c/code\u003e method and requires the \u003ccode\u003econtent\u003c/code\u003e authorization scope.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be empty, and a successful response will be an empty JSON object.\u003c/p\u003e\n"],["\u003cp\u003eFrequent data updates should be done via the Products service instead of this method.\u003c/p\u003e\n"]]],["This document details the process of manually fetching data from a data source in a Merchant Center Account. It uses a `POST` HTTP request to a specified URL, including a required `name` path parameter identifying the data source. The request body must be empty. A successful fetch returns an empty JSON object in the response body. This action should only occur once per day, and it requires `https://www.googleapis.com/auth/content` OAuth scope authorization. The request uses gRPC Transcoding.\n"],null,["# Method: accounts.dataSources.fetch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nPerforms the data fetch immediately (even outside fetch schedule) on a data source from your Merchant Center Account. If you need to call this method more than once per day, you should use the Products service to update your product data instead. This method only works on data sources with a file input set.\n\n### HTTP request\n\n`POST https://merchantapi.googleapis.com/datasources/v1beta/{name=accounts/*/dataSources/*}:fetch`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The name of the data source resource to fetch. Format: `accounts/{account}/dataSources/{datasource}` |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\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)."]]