Method: inventory.custombatch

Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products.

HTTP request

POST https://www.googleapis.com/content/v2/inventory/batch

Query parameters

Parameters
dryRun

boolean

Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).

Request body

The request body contains an instance of InventoryCustomBatchRequest.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "entries": [
    {
      object (InventoryCustomBatchResponseEntry)
    }
  ],
  "kind": string
}
Fields
entries[]

object (InventoryCustomBatchResponseEntry)

The result of the execution of the batch requests.

kind

string

Identifies what kind of resource this is. Value: the fixed string

"content#inventoryCustomBatchResponse"

.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/content
  • https://www.googleapis.com/auth/structuredcontent

For more information, see the OAuth 2.0 Overview.

InventoryCustomBatchRequest

JSON representation
{
  "entries": [
    {
      object (InventoryCustomBatchRequestEntry)
    }
  ]
}
Fields
entries[]

object (InventoryCustomBatchRequestEntry)

The request entries to be processed in the batch.

InventoryCustomBatchRequestEntry

A batch entry encoding a single non-batch inventory request.

JSON representation
{
  "batchId": integer,
  "merchantId": string,
  "storeCode": string,
  "productId": string,
  "inventory": {
    object (Inventory)
  }
}
Fields
batchId

integer (uint32 format)

An entry ID, unique within the batch request.

merchantId

string

The ID of the managing account.

storeCode

string

The code of the store for which to update price and availability. Use online to update price and availability of an online product.

productId

string

The ID of the product for which to update price and availability.

inventory

object (Inventory)

Price and availability of the product.

InventoryCustomBatchResponseEntry

A batch entry encoding a single non-batch inventory response.

JSON representation
{
  "batchId": integer,
  "errors": {
    object (Errors)
  },
  "kind": string
}
Fields
batchId

integer (uint32 format)

The ID of the request entry this entry responds to.

errors

object (Errors)

A list of errors defined if and only if the request failed.

kind

string

Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponseEntry"

Try it!