Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How do I find outstanding orders after a specified date?

How do I find outstanding orders after a specified date?

JChaooo
Tourist
4 0 1

I would like to query all outstanding orders after 01/01/2023 by batch operation, what should I do?

Our definition of an outstanding order is
fulfillment_status = none/partial (not delivered/partially delivered)
financial_status = partially_paid, paid, partially_refunded (part-paid/part-paid/part-refunded)

Replies 2 (2)

Liam
Community Manager
3108 344 899

You can use the GraphQL API to query orders and use an argument for `after`, as well as filter with `financial_status` and `fulfillment_status`, 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

JChaooo
Tourist
4 0 1

My query looks like this. What's wrong with it?

One more question, I want to query all the details of the order, but I don't want to list all the attributes. What should I do?

```

orders(query: "created_at:>=2023-01-01 AND (financial_status:PARTIALLY_PAID OR financial_status:PAID OR financial_status:PARTIALLY_REFUNDED OR (NOT fulfillment_status:FULFILLED))") {...}

```