Get Latest Closed Purchase Orders

Hi, I need to query any POs that were closed since Yesterday. Basically something equivalent to SOs ‘updated_from + fulfillment_status’ query filters.
How should I go about it - I went through the docs and couldn’t find it…
Thank you!

Hello @raj!

Unfortunately, we don’t have those fields as filters for that query at the moment.

You can filter by created_from, the creation date, and po_date_from, which is the expected arrival date, but I don’t think these align with your requirements.

Included in the data you can get for each PO node, you have the fields fulfillment_status and date_closed, which you could analyze to find the information you need.

Have you checked our PO update webhook? This might help with your solution as you will get an update when a PO is closed: Webhooks – Developer Resources | ShipHero

Kind regards,

Thank you @tomasfd - you’re right, those filters I already came across in the docs and they won’t work for me in this case.

And the webhook is outside the purview of the project I’m working on, but certainly interesting for some future usage - so I appreciate you bringing it up.

Now my Plan B is to first query ALL my pending POs and check their fulfillment_status, and if it is “closed” then get their full line details (that’s what I need, but for just the latest closed POs) - do you think that’s the best course of action here given the limitations?