Admin API list all orders with current order status

I’m having a little trouble, and hoping someone can help. I’ve referred to the API documentation, but what I’m looking for doesn’t seem to be there - yet it seems such a simple ask, I feel I’m missing something.

I’d like to obtain a list of orders, including a field that shows the current order status (open, closed, archived, etc). From what I can see, I can request a list of orders where status = any, but that doesn’t provide an indication of which status applies to a given order.

Do I really need to run multiple requests each with status filtered to a different value

Hey there,

The API response doesn’t have a field for the order status.

What you can do instead is use the closed_at and cancelled_at fields to determine the order status.

  • Open - closed_at and cancelled_at are null
  • Closed/Archived - closed_at is not null
  • Cancelled - cancelled_at is not null

Right, thank you!

I didn’t realise ‘closed_at’ is populated for archived cases. I’ll try working from this route, I appreciate it.