AI-generated Key Takeaways
- 
          Updates local inventory for multiple products or stores with a single POSTrequest to the specified endpoint.
- 
          Requires authorization with the https://www.googleapis.com/auth/contentscope.
- 
          The request body should contain a LocalinventoryCustomBatchRequestobject with entries for each product or store update.
- 
          Each entry specifies the desired action ( insert), merchant ID, product ID, and local inventory data.
- 
          The response includes a list of entries with the results of each update, including any errors encountered. 
- HTTP request
- Request body
- Response body
- Authorization scopes
- LocalinventoryCustomBatchRequest
- LocalinventoryCustomBatchRequestEntry
- LocalinventoryCustomBatchResponseEntry
- Try it!
Updates local inventory for multiple products or stores in a single request.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/localinventory/batch
Request body
The request body contains an instance of LocalinventoryCustomBatchRequest.
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.
LocalinventoryCustomBatchRequest
| JSON representation | 
|---|
| {
  "entries": [
    {
      object ( | 
| Fields | |
|---|---|
| entries[] | 
 The request entries to be processed in the batch. | 
LocalinventoryCustomBatchRequestEntry
Batch entry encoding a single local inventory update request.
| JSON representation | 
|---|
| {
  "batchId": integer,
  "merchantId": string,
  "method": string,
  "productId": string,
  "localInventory": {
    object ( | 
| Fields | |
|---|---|
| batchId | 
 An entry ID, unique within the batch request. | 
| merchantId | 
 The ID of the managing account. | 
| method | 
 Method of the batch request entry. Acceptable values are: 
 | 
| productId | 
 The ID of the product for which to update local inventory. | 
| localInventory | 
 Local inventory of the product. | 
LocalinventoryCustomBatchResponseEntry
Batch entry encoding a single local inventory update response.
| JSON representation | 
|---|
| {
  "batchId": integer,
  "errors": {
    object ( | 
| Fields | |
|---|---|
| batchId | 
 The ID of the request entry this entry responds to. | 
| errors | 
 A list of errors for failed custombatch entries. | 
| kind | 
 Identifies what kind of resource this is. Value: the fixed string " |