I am looking to retrieve the last-ordered quantity of an item variation. Using the Inventory API and the Batch Retrieve Changes endpoint I can see the “purchase_order_id” field, but there is not a way to filter by it or retrieve purchase order information. Anyone have experience with this particular use-case or is there a possibility of implementing it? Additionally, the response includes two entries per purchase order on the “from_state” and “to_state,” NONE -> ORDERED_FROM_VENDOR and ORDERED_FROM_VENDOR -> IN_STOCK. Any thoughts?
I believe purchase_order_id
is only applicable for Square for Retail, and I’m not too familiar with Square for Retail - but presumably you should be able to pass that order_id
to the BatchRetrieveOrders endpoint if you wanted to dig into the order itself.
If you don’t really care about the order, then you can definitely filter by catalog_object_ids
and states
if you only want to search a particular object’s transition from one state to another.
Definitely a Square for Retail feature and it looks like passing any IDs to BatchRetriveOrders does not return anything. I figured that would be the case, but thanks for the recommendations. Sounds like filtering on catalog_object_ids
and states
is the way to go.