About the GraphQL API category

Found any bugs? Need help making a particular call? This is your place

Hi @khanhnc46 !
Would a query like this one work for you?:

query {
  inventory_changes(
    sku: "testingSKU"
    date_from: "2020-01-01"
    date_to: "2020-02-01"
  ) {
    request_id
    complexity
    data(first: 10) {
      edges {
        node {
          user_id
          account_id
          warehouse_id
          sku
          previous_on_hand
          change_in_on_hand
          reason
          created_at
        }
      }
    }
  }
}

And in the reason field you should see if it was shipped on an order or it’s inventory was manually changed, for example:

“reason”: “Order <a href=”/dashboard/orders/details/1111111">#MO706 shipped"

Let me know if this doesn’t help!
Thanks,
Tom

Hi @tomasw !

that helps, only thing is I have to go through every product and apply that query for each.

Thanks.

1 Like