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

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

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?status=any

Hope this helps!

Hi Csam,

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

Thanks,

Sahan