Method: products.custombatch

Retrieves, inserts, and deletes multiple products in a single request.

HTTP request

POST https://www.googleapis.com/content/v2.1/products/batch

Request body

The request body contains an instance of ProductsCustomBatchRequest.

Response body

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

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

object (ProductsCustomBatchResponseEntry)

The result of the execution of the batch requests.

kind

string

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

"content#productsCustomBatchResponse"

.

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.

ProductsCustomBatchRequest

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

object (ProductsCustomBatchRequestEntry)

The request entries to be processed in the batch.

ProductsCustomBatchRequestEntry

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

JSON representation
{
  "batchId": integer,
  "merchantId": string,
  "method": string,
  "productId": string,
  "product": {
    object (Product)
  },
  "feedId": string
}
Fields
batchId

integer (uint32 format)

An entry ID, unique within the batch request.

merchantId

string

The ID of the managing account.

method

string

The method of the batch entry.

Acceptable values are:

  • "delete"
  • "get"
  • "insert"

productId

string

The ID of the product to get or delete. Only defined if the method is get or delete.

product

object (Product)

The product to insert. Only required if the method is insert.

feedId

string

The Content API feed id.

ProductsCustomBatchResponseEntry

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

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

integer (uint32 format)

The ID of the request entry this entry responds to.

kind

string

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

product

object (Product)

The inserted product. Only defined if the method is insert and if the request was successful.

errors

object (Errors)

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

Try it!