# Account\_id in inventory\_changes result

**URL:** <https://community.shiphero.com/t/account-id-in-inventory-changes-result/1234>\
**Category:** GraphQL API\
**Created:** [April 5, 2021, 5:03pm UTC](https://community.shiphero.com/t/account-id-in-inventory-changes-result/1234 "2021-04-05T17:03:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [April 5, 2021, 5:03pm UTC](https://community.shiphero.com/t/account-id-in-inventory-changes-result/1234/1 "2021-04-05T17:03:00Z")

</div>

I need to get the account details for each inventory\_change using a 3PL account.

I am running this query using a 3PL parent API key to first get all the accounts.

{ account { request\_id complexity data { customers { edges { node { id warehouses { company\_alias } } } } } } }

I then run this query using the same 3PL parent API key to get inventory\_changes:

{ inventory\_changes(date\_from:“2021-04-05”){ request\_id complexity data(first: 25 ){ pageInfo{ hasNextPage endCursor} edges{ node {location\_id user\_id account\_id warehouse\_id sku previous\_on\_hand change\_in\_on\_hand reason location {name} created\_at} } } } }

I am getting “inventory\_changes” returned with “account\_id” values that do not exist in the previous “account” query result.

What exactly does the “account\_id” represent in the “inventory\_changes” result? Why am I not getting this account returned in the “accounts” query?

Is there a better way to get account details joined with inventory\_changes?

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [April 12, 2021, 11:48pm UTC](https://community.shiphero.com/t/account-id-in-inventory-changes-result/1234/2 "2021-04-12T23:48:21Z")

</div>

Hi @bbarrett!  
That might be because one of them might be the UUID and the other the Legacy ID

If you try getting the Lecagy ID with:

```
query {
  account {
    request_id
    complexity
    data {
      customers {
        edges {
          node {
            id
            legacy_id
            warehouses {
              company_alias
            }
          }
        }
      }
    }
  }
}

```

Does it match both of them?  
Thanks in advance!  
Tom
