AI-generated Key Takeaways
- 
          Allows retrieval, insertion, and deletion of multiple products using a single POST request to the specified endpoint. 
- 
          Requires authorization with the https://www.googleapis.com/auth/contentscope.
- 
          Request body must contain a ProductsCustomBatchRequestobject with individual entries defining the desired operations for each product.
- 
          Each entry in the request specifies the operation ( get,insert,delete,update), target product ID, and any relevant product data or update mask.
- 
          The response includes a list of ProductsCustomBatchResponseEntryobjects, each containing the result of the corresponding operation or any errors encountered.
- HTTP request
- Request body
- Response body
- Authorization scopes
- ProductsCustomBatchRequest
- ProductsCustomBatchRequestEntry
- ProductsCustomBatchResponseEntry
- Try it!
Retrieves, inserts, and deletes multiple products in a single request.
HTTP request
POST https://shoppingcontent.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 ( | 
| Fields | |
|---|---|
| entries[] | 
 The result of the execution of the batch requests. | 
| kind | 
 Identifies what kind of resource this is. Value: the fixed string " | 
Authorization scopes
Requires one of the following OAuth scopes:
- https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
ProductsCustomBatchRequest
| JSON representation | 
|---|
| {
  "entries": [
    {
      object ( | 
| Fields | |
|---|---|
| entries[] | 
 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 ( | 
| Fields | |
|---|---|
| batchId | 
 An entry ID, unique within the batch request. | 
| merchantId | 
 The ID of the managing account. | 
| method | 
 The method of the batch entry. Acceptable values are: 
 | 
| productId | 
 The ID of the product to get or mutate. Only defined if the method is  | 
| product | 
 The product to insert or update. Only required if the method is  | 
| feedId | 
 The Content API Supplemental Feed ID. If present then product insertion or deletion applies to a supplemental feed instead of primary Content API feed. | 
| updateMask | 
 The comma-separated list of product attributes to be updated. Example:  | 
ProductsCustomBatchResponseEntry
A batch entry encoding a single non-batch products response.
| JSON representation | 
|---|
| { "batchId": integer, "kind": string, "product": { object ( | 
| Fields | |
|---|---|
| batchId | 
 The ID of the request entry this entry responds to. | 
| kind | 
 Identifies what kind of resource this is. Value: the fixed string " | 
| product | 
 The inserted product. Only defined if the method is  | 
| errors | 
 A list of errors for failed custombatch entries. |