# Batch Inventory Counts API Call

**URL:** <https://developer.squareup.com/forums/t/batch-inventory-counts-api-call/276>\
**Category:** Questions\
**Tags:** inventory-api\
**Created:** [May 19, 2020, 12:52pm UTC](https://developer.squareup.com/forums/t/batch-inventory-counts-api-call/276 "2020-05-19T12:52:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgeedwards](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@georgeedwards](https://developer.squareup.com/forums/u/georgeedwards)\
**Post date:** [May 19, 2020, 12:52pm UTC](https://developer.squareup.com/forums/t/batch-inventory-counts-api-call/276/1 "2020-05-19T12:52:05Z")

</div>

I am trying to get a full list of all my current inventory counts. This is my current code using the connect nodejs SDK:

```auto

    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?

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [May 19, 2020, 3:51pm UTC](https://developer.squareup.com/forums/t/batch-inventory-counts-api-call/276/2 "2020-05-19T15:51:25Z")

</div>

Not 100% sure, as we don’t seem to document it, but it’s very possible this endpoint has a max page of 100 items, so you would need to use the `cursor` to call the endpoint again to get the next page. Are you receiving a `cursor` in the response?

---

<div class="post-metadata">

**Author:** ![georgeedwards](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@georgeedwards](https://developer.squareup.com/forums/u/georgeedwards)\
**Post date:** [May 19, 2020, 4:04pm UTC](https://developer.squareup.com/forums/t/batch-inventory-counts-api-call/276/3 "2020-05-19T16:04:26Z")

</div>

Thanks for coming back to me - I did think that. But I am not getting any cursor reply and even on requests which should be returning less than 100 responses, I am still getting the same behaviour?
