AI-generated Key Takeaways
- 
          
Batches multiple Point-of-Sale (POS) data calls, such as inventory updates and sales, into a single request to the Google Content API for Shopping.
 - 
          
Includes methods for inserting, deleting, getting, updating inventory, and reporting sales for items in specific stores.
 - 
          
Requires authorization with the
https://www.googleapis.com/auth/contentscope. - 
          
The request body utilizes the
PosCustomBatchRequestobject which contains individualPosCustomBatchRequestEntryobjects, each specifying a POS operation. - 
          
Responses are provided in a
PosCustomBatchResponseobject containing individualPosCustomBatchResponseEntryobjects, detailing the outcome of each operation within the batch. 
- HTTP request
 - Request body
 - Response body
 - Authorization scopes
 - PosCustomBatchRequest
 - PosCustomBatchRequestEntry
 - PosInventory
 - PosSale
 - PosCustomBatchResponseEntry
 - Try it!
 
Batches multiple POS-related calls in a single request.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/pos/batch
Request body
The request body contains an instance of PosCustomBatchRequest.
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.
PosCustomBatchRequest
| JSON representation | 
|---|
{
  "entries": [
    {
      object ( | 
              
| Fields | |
|---|---|
entries[] | 
                
                   
 The request entries to be processed in the batch.  | 
              
PosCustomBatchRequestEntry
| JSON representation | 
|---|
{ "batchId": integer, "merchantId": string, "method": string, "targetMerchantId": string, "storeCode": string, "store": { object (  | 
              
| Fields | |
|---|---|
batchId | 
                
                   
 An entry ID, unique within the batch request.  | 
              
merchantId | 
                
                   
 The ID of the POS data provider.  | 
              
method | 
                
                   
 The method of the batch entry. Acceptable values are: 
  | 
              
targetMerchantId | 
                
                   
 The ID of the account for which to get/submit data.  | 
              
storeCode | 
                
                   
 The store code. This should be set only if the method is   | 
              
store | 
                
                   
 The store information to submit. This should be set only if the method is   | 
              
inventory | 
                
                   
 The inventory to submit. This should be set only if the method is   | 
              
sale | 
                
                   
 The sale information to submit. This should be set only if the method is   | 
              
PosInventory
The absolute quantity of an item available at the given store.
| JSON representation | 
|---|
{
  "kind": string,
  "storeCode": string,
  "itemId": string,
  "targetCountry": string,
  "contentLanguage": string,
  "gtin": string,
  "price": {
    object ( | 
              
| Fields | |
|---|---|
kind | 
                
                   
 Identifies what kind of resource this is. Value: the fixed string "  | 
              
storeCode | 
                
                   
 Required. The identifier of the merchant's store. Either a   | 
              
itemId | 
                
                   
 Required. A unique identifier for the item.  | 
              
targetCountry | 
                
                   
 Required. The CLDR territory code for the item.  | 
              
contentLanguage | 
                
                   
 Required. The two-letter ISO 639-1 language code for the item.  | 
              
gtin | 
                
                   
 Global Trade Item Number.  | 
              
price | 
                
                   
 Required. The current price of the item.  | 
              
quantity | 
                
                   
 Required. The available quantity of the item.  | 
              
timestamp | 
                
                   
 Required. The inventory timestamp, in ISO 8601 format.  | 
              
pickupMethod | 
                
                   
 Optional. Supported pickup method for this offer. Unless the value is "not supported", this field must be submitted together with   | 
              
pickupSla | 
                
                   
 Optional. Expected date that an order will be ready for pickup relative to the order date. Must be submitted together with   | 
              
PosSale
The change of the available quantity of an item at the given store.
| JSON representation | 
|---|
{
  "kind": string,
  "storeCode": string,
  "itemId": string,
  "targetCountry": string,
  "contentLanguage": string,
  "gtin": string,
  "price": {
    object ( | 
              
| Fields | |
|---|---|
kind | 
                
                   
 Identifies what kind of resource this is. Value: the fixed string "  | 
              
storeCode | 
                
                   
 Required. The identifier of the merchant's store. Either a   | 
              
itemId | 
                
                   
 Required. A unique identifier for the item.  | 
              
targetCountry | 
                
                   
 Required. The CLDR territory code for the item.  | 
              
contentLanguage | 
                
                   
 Required. The two-letter ISO 639-1 language code for the item.  | 
              
gtin | 
                
                   
 Global Trade Item Number.  | 
              
price | 
                
                   
 Required. The price of the item.  | 
              
quantity | 
                
                   
 Required. The relative change of the available quantity. Negative for items returned.  | 
              
timestamp | 
                
                   
 Required. The inventory timestamp, in ISO 8601 format.  | 
              
saleId | 
                
                   
 A unique ID to group items from the same sale event.  | 
              
PosCustomBatchResponseEntry
| JSON representation | 
|---|
{ "batchId": integer, "store": { object (  | 
              
| Fields | |
|---|---|
batchId | 
                
                   
 The ID of the request entry to which this entry responds.  | 
              
store | 
                
                   
 The retrieved or updated store information.  | 
              
errors | 
                
                   
 A list of errors defined if, and only if, the request failed.  | 
              
inventory | 
                
                   
 The updated inventory information.  | 
              
sale | 
                
                   
 The updated sale information.  | 
              
kind | 
                
                   
 Identifies what kind of resource this is. Value: the fixed string "  |