How to get the "On Order" qty from API?

Hi there,

We want to query using SKU and get the “On Order” qty shown here:

We checked the API it seems this field is not returned…

How can we get this “On order” ? Do we need to first query “Purchase Orders” to get a list of POs, and then query “Purchase Order” to get the quantity and quantity_received, do the calculation, and add all numbers up to get this number on the SKU level?

Thank you very much! Any insight is greatly appreciated.

Best,
Chen

Hey @Chen,

Thanks for reaching out and welcome to our Developer Community!

You are correct, there is no on_order value that is pullable from the Public API.

You are able to calculate the value using the process you mentioned, but it is possible to get the values needed in one query and do the calculation from there.

{
  warehouse_products(sku: "CHARGER") {
    request_id
    complexity
    data(first: 2) {
      edges {
        node {
          id
          legacy_id
          on_hand
          warehouse_id
          warehouse_identifier
          inbounds(first: 10) {
            edges {
              node {
                id
                legacy_id
                po_id
                sku
                quantity
              }
            }
          }
        }
      }
    }
  }
}

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

Best,
RayanP

Thank you very much for the information Rayan!

1 Like

Hi Rayanp, do you know if there’s a plan for this data available from the Publich API in the future? Thanks!

Hey @Chen,

Thanks for hanging in there!

There are no plans at the moment to add this data to the Public API, but I will share your feedback about this with the product team.

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

Best,
RayanP