- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- ProductInputConfig
- ProductInlineSource
- ReconciliationMode
- Try it!
Bulk import of multiple Product
s.
Request processing may be synchronous. Non-existing items are created.
Note that it is possible for a subset of the Product
s to be successfully updated.
HTTP request
POST https://retail.googleapis.com/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:import
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. 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 |
---|
{ "requestId": string, "inputConfig": { object ( |
Fields | |
---|---|
requestId |
Deprecated. This field has no effect. |
input |
Required. The desired input location of the data. |
errors |
The desired location of errors incurred during the Import. |
update |
Indicates which fields in the provided imported This is a comma-separated list of fully qualified names of fields. Example: |
reconciliation |
The mode of reconciliation between existing products and the products to be imported. Defaults to |
notification |
Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Format of the Pub/Sub topic is Only supported when |
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 |
Fields | |
---|---|
Union field source . Required. The source of the input. source can be only one of the following: |
|
product |
The Inline source for the input content for products. |
gcs |
Google Cloud Storage location for the input content. |
big |
BigQuery input source. |
ProductInlineSource
The inline source for the input config for products.import method.
JSON representation |
---|
{
"products": [
{
object ( |
Fields | |
---|---|
products[] |
Required. A list of products to update/create. Each product must have a valid |
ReconciliationMode
Indicates how imported products are reconciled with the existing products created or imported before.
Enums | |
---|---|
RECONCILIATION_MODE_UNSPECIFIED |
Defaults to INCREMENTAL. |
INCREMENTAL |
Inserts new products or updates existing products. |
FULL |
Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location. |