# Get Latest Closed Purchase Orders

**URL:** <https://community.shiphero.com/t/get-latest-closed-purchase-orders/1847>\
**Category:** GraphQL API\
**Created:** [January 31, 2022, 6:10pm UTC](https://community.shiphero.com/t/get-latest-closed-purchase-orders/1847 "2022-01-31T18:10:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.shiphero.com/u/Raj)\
**Post date:** [January 31, 2022, 6:10pm UTC](https://community.shiphero.com/t/get-latest-closed-purchase-orders/1847/1 "2022-01-31T18:10:49Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [January 31, 2022, 7:24pm UTC](https://community.shiphero.com/t/get-latest-closed-purchase-orders/1847/2 "2022-01-31T19:24:39Z")

</div>

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](https://developer.shiphero.com/webhooks#po-update-webhook)

Kind regards,  
TomasFD

---

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.shiphero.com/u/Raj)\
**Post date:** [January 31, 2022, 7:30pm UTC](https://community.shiphero.com/t/get-latest-closed-purchase-orders/1847/3 "2022-01-31T19:30:40Z")

</div>

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?

Cheers!
