Using the REST API, How can I find out which of my Orders were Cancelled?

Using the REST API, How can I find out which of my Orders were Cancelled?

sm_inty_dev_123
Visitor
2 0 0

Hi,

 

I am trying to find out the Status of my Orders using the REST API.

 

Specifically I want to know which of my Orders were Cancelled.

 

I am not sure if I can query the Object Status using the REST API? 

 

Can you please help me with this?

 

Thanks,

Sahan

Replies 2 (2)

csam
Shopify Staff (Retired)
267 40 51

Hi @sm_inty_dev_123 

 

You can query specifically for cancelled orders by adding status=cancelled to the end of the request URL. Eg. examplestore.myshopify.com/admin/api/2021-10/orders.json?status=cancelled

 

You can read more about this here: https://shopify.dev/api/admin-rest/2021-10/resources/order#[get]/admin/api/2021-10/orders.json?statu...

 

Hope this helps!

To learn more visit the Shopify Help Center or the Community Blog.

sm_inty_dev_123
Visitor
2 0 0

Hi Csam,

 

Thank you so much for your help. I will try it out

 

Thanks,

 

Sahan