I am trying to get a full list of all my current inventory counts. This is my current code using the connect nodejs SDK:
var inventoryApiInstance = new SquareConnect.InventoryApi();
var param: SquareConnect.BatchRetrieveInventoryCountsRequest = {location_ids: ['G8BGBETP8ZQAV']};
var body = new SquareConnect.BatchRetrieveInventoryCountsRequest(parm); // BatchRetrieveInventoryCountsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
return inventoryApiInstance.batchRetrieveInventoryCounts(body).then((data) => {
console.log('Recieved ', data.counts.length, ' items')
}, function(error) {
console.error(error);
});
I have 25 items in my account, present at all locations (there are 5). They all have only 1 variation. So my understanding is that this API call should return an object with a length of 25 items. If I remove the param
definition, I would expect to receive 125 (25 items across 5 locations) responses. However, in both scenarios, the response object has a length of 100 items?
Am I missing something?