I’m trying to get OrderIDs/TransactionIDs from specific CatalogIds. In my current code I’m passing in 18 strings to the BRICReq(), but I’m getting back everything as if I have no filter. When I run the same 18 CatalogIDs in the API explorer, I get back the expected values. I tried copy/pasting the code from the API explorer that worked, and I get the same unfiltered result.
What am I doing wrong with filtering?
IEnumerable<string> classIds = classes.Select(c => c.SquareID);
Pager invChanges = await _client.Inventory.BatchGetChangesAsync(
new BatchRetrieveInventoryChangesRequest()
{
CatalogObjectIds = classIds,
LocationIds = [LocationId]
});
Page<InventoryChange> page = invChanges.CurrentPage;
List<Adjustment> adjustments = [];
//Iterate all pages
do
{
//Iterate all items getting quantites in an out
foreach (var item in page.Items)
{
...
}
if (invChanges.HasNextPage)
page = await invChanges.GetNextPageAsync();
else
page = Page<InventoryChange>.Empty;
} while (!page.IsEmpty);