Method: accounts.productInputs.insert
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-06。
[null,null,["最后更新时间 (UTC):2025-02-06。"],[[["\u003cp\u003eThis method uploads a product input to your Merchant Center account, replacing existing entries with the same contentLanguage, offerId, and dataSource.\u003c/p\u003e\n"],["\u003cp\u003eThe product input can be inserted into a specified account using the \u003ccode\u003ePOST\u003c/code\u003e method and may take several minutes to be processed and retrievable.\u003c/p\u003e\n"],["\u003cp\u003eRequests require specifying the parent account and dataSource via path and query parameters, respectively, with the body containing the ProductInput.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful responses return the inserted ProductInput object, and authorization necessitates the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This describes the process of uploading a product input to a Merchant Center account via a POST request. The request requires a `parent` path parameter specifying the account and a `dataSource` query parameter. The request body contains `ProductInput` data, and if successful, the response body will also contain `ProductInput`. The upload may replace an existing entry if it shares `contentLanguage`, `offerId`, and `dataSource`. Processing can take several minutes. The API method is authorized by `https://www.googleapis.com/auth/content` scope.\n"],null,["# Method: accounts.productInputs.insert\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- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\n[Uploads a product input to your Merchant Center account](/merchant/api/guides/products/overview#upload-product-input). You must have a products [data source](/merchant/api/guides/data-sources/overview) to be able to insert a product. The unique identifier of the data source is passed as a query parameter in the request URL.\n\nIf a product input with the same contentLanguage, offerId, and dataSource already exists, then the product input inserted by this method replaces that entry.\n\nAfter inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.\n\n### HTTP request\n\n`POST https://merchantapi.googleapis.com/products/v1beta/{parent=accounts/*}/productInputs:insert`\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 where this product will be inserted. Format: `accounts/{account}` |\n\n### Query parameters\n\n| Parameters ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `dataSource` | `string` Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. For more information, see [Overview of Data sources sub-API](/merchant/api/guides/data-sources/overview). Only API data sources are supported. Format: `accounts/{account}/dataSources/{datasource}`. For example, `accounts/123456/dataSources/104628`. |\n\n### Request body\n\nThe request body contains an instance of [ProductInput](/merchant/api/reference/rest/products_v1beta/accounts.productInputs#ProductInput).\n\n### Response body\n\nIf successful, the response body contains an instance of [ProductInput](/merchant/api/reference/rest/products_v1beta/accounts.productInputs#ProductInput).\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)."]]