- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
Uploads a product input to your Merchant Center account. If an input with the same contentLanguage, offerId, and dataSource already exists, this method replaces that entry.
After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
HTTP request
POST https://merchantapi.googleapis.com/products/v1beta/{parent=accounts/*}/productInputs:insert
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. The account where this product will be inserted. Format: accounts/{account} |
Query parameters
Parameters | |
---|---|
dataSource |
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. Format: |
Request body
The request body contains an instance of ProductInput
.
Response body
This resource represents input data you submit for a product, not the processed product that you see in Merchant Center, in Shopping ads, or across Google surfaces. Product inputs, rules and supplemental data source data are combined to create the processed [product][google.shopping.content.bundles.Products.Product].
Required product input attributes to pass data validation checks are primarily defined in the Products Data Specification.
The following attributes are required: [feedLabel][google.shopping.content.bundles.Products.feed_label], [contentLanguage][google.shopping.content.bundles.Products.content_language] and [offerId][google.shopping.content.bundles.Products.offer_id].
After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
All fields in the product input and its sub-messages match the English name of their corresponding attribute in the vertical spec with some exceptions.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "name": string, "product": string, "channel": enum ( |
Fields | |
---|---|
name |
Identifier. The name of the product input. Format: |
product |
Output only. The name of the processed product. Format: |
channel |
Required. Immutable. The channel of the product. |
offerId |
Required. Immutable. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the products data specification for details. |
contentLanguage |
Required. Immutable. The two-letter ISO 639-1 language code for the product. |
feedLabel |
Required. Immutable. The feed label for the product. |
attributes |
Optional. A list of product attributes. |
customAttributes[] |
Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, |
versionNumber |
Optional. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time. If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current Only supported for insertions into primary data sources. If the operation is prevented, the aborted exception will be thrown. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.