Method: accounts.productInputs.insert
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-02-06 UTC。
[null,null,["最終更新日 2025-02-06 UTC。"],[[["\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,["- [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/add-manage#add_a_product). You must have a products [data source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source) 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\nHTTP 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\nPath parameters\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The account where this product will be inserted. Format: `accounts/{account}` |\n\nQuery 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 [Create a primary data source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source). Only API data sources are supported. Format: `accounts/{account}/dataSources/{datasource}`. For example, `accounts/123456/dataSources/104628`. |\n\nRequest body\n\nThe request body contains an instance of [ProductInput](/merchant/api/reference/rest/products_v1beta/accounts.productInputs#ProductInput).\n\nResponse body\n\nIf successful, the response body contains an instance of [ProductInput](/merchant/api/reference/rest/products_v1beta/accounts.productInputs#ProductInput).\n\nAuthorization 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)."]]