Method: projects.locations.catalogs.branches.products.import

Bulk import of multiple Products.

Request processing may be synchronous. No partial updating is supported. Non-existing items are created.

Note that it is possible for a subset of the Products to be successfully updated.

HTTP request

POST https://retail.googleapis.com/v2beta/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:import

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. projects/1234/locations/global/catalogs/default_catalog/branches/default_branch

If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.

Request body

The request body contains data with the following structure:

JSON representation
{
  "inputConfig": {
    object (ProductInputConfig)
  },
  "errorsConfig": {
    object (ImportErrorsConfig)
  },
  "updateMask": string
}
Fields
inputConfig

object (ProductInputConfig)

Required. The desired input location of the data.

errorsConfig

object (ImportErrorsConfig)

The desired location of errors incurred during the Import.

updateMask

string (FieldMask format)

Indicates which fields in the provided imported 'products' to update. If not set, will by default update all fields.

A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.products.import

For more information, see the IAM documentation.

ProductInputConfig

The input config source for products.

JSON representation
{

  // Union field source can be only one of the following:
  "productInlineSource": {
    object (ProductInlineSource)
  },
  "gcsSource": {
    object (GcsSource)
  },
  "bigQuerySource": {
    object (BigQuerySource)
  }
  // End of list of possible types for union field source.
}
Fields
Union field source. Required. The source of the input. source can be only one of the following:
productInlineSource

object (ProductInlineSource)

The Inline source for the input content for products.

gcsSource

object (GcsSource)

Google Cloud Storage location for the input content.

bigQuerySource

object (BigQuerySource)

BigQuery input source.

ProductInlineSource

The inline source for the input config for products.import method.

JSON representation
{
  "products": [
    {
      object (Product)
    }
  ]
}
Fields
products[]

object (Product)

Required. A list of products to update/create. Each product must have a valid Product.id. Recommended max of 10k items.