Inventory_changes query returning duplicates between parent 3PL and child

We are using an API key for a child account to access inventory_changes. The query results sometimes include records with the “account_id” of the 3PL parent account. Is this expected behavior? Should I get inventory_change records with the 3PL parent’s account_id when calling from a child account API key?

This is causing problems where we get duplicate results where one record has the parent 3PL account_id and the other with the child account_id.

I thought the child API keys are designed such that they only return data in the context of the child account. Why would I get inventory_change records associated with both the parent 3PL and child account?

Hey @bbarrett,

Thanks for reaching out. I’ll investigate this matter and get back to you.

Best,
RayanP

Hello @bbarrett!

Can you share a sku/request id/inventory change case? Basically, anything that can point us to a specific case where you are seeing this, we were not able to reproduce it on our end.

Kind regards,
TomasFD

Here is a case where all the data is duplicated between 2 different account_id:

account_id QWNjb3VudDozNTI4 QWNjb3VudDo2NTM0OA==
Warehouse Phoenix Direct / Primary Phoenix Direct / Primary
Cost 69.5 69.5
user_id VXNlcjo4MTMzMQ== VXNlcjo4MTMzMQ==
account_id QWNjb3VudDozNTI4 QWNjb3VudDo2NTM0OA==
warehouse_id V2FyZWhvdXNlOjU5NjU= V2FyZWhvdXNlOjU5NjU=
sku 41183 NAVY 3XT 41183 NAVY 3XT
previous_on_hand 0 0
change_in_on_hand 6 6
reason Received from Purchase Order 100032134 Received from Purchase Order 100032134
location WBT Receiving WBT Receiving
created_at 2022-08-03T17:00:36 2022-08-03T17:00:36
PO 100032134 100032134
VendorName PETER MILLAR PETER MILLAR
Name Peter Millar Carlow Crown Lite Cotton-Blend Sport Shirt Navy / 3XT Peter Millar Carlow Crown Lite Cotton-Blend Sport Shirt Navy / 3XT
ShopifyPrice 198 198
POStatus closed closed
LineStatus closed closed
quantity_received 6 6

Hey @bbarrett,

Thanks for hanging in there.

I’ve been testing this, and I’ve only been able to get the child account id. Do you by chance have a request id for this? I don’t see any calls from this child account when trying to look deeper.

Please let me know if you have any questions or concerns!

Best,
RayanP