# Default orders sorting criteria on orders endpoint

**URL:** <https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98>\
**Category:** API Queries (How To)\
**Created:** [March 5, 2018, 2:52pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98 "2018-03-05T14:52:28Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![techosunny](https://avatars.discourse-cdn.com/v4/letter/t/00F991/32.png) [@techosunny](https://developer-forum.veeqo.com/u/techosunny)\
**Post date:** [March 5, 2018, 2:52pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/1 "2018-03-05T14:52:28Z")

</div>

Hello there,

Do you please tell me what is default sorting criteria of orders ?

Note: Like which order obtained on top when making GET request to orders endpoint. As per my understanding, it is order update date. Means recently updated or created order always on top.

What is your default sorting applied on orders. So, I can envision and change my client application.

Thanks

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [March 5, 2018, 2:57pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/2 "2018-03-05T14:57:42Z")

</div>

Hey

They should be sorted by `updated_at`

Let me know if you see any different.

Edit: The default sorting is by `created_at`

---

<div class="post-metadata">

**Author:** ![techosunny](https://avatars.discourse-cdn.com/v4/letter/t/00F991/32.png) [@techosunny](https://developer-forum.veeqo.com/u/techosunny)\
**Post date:** [March 5, 2018, 3:00pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/3 "2018-03-05T15:00:59Z")

</div>

Hey Phil,  
Thanks for quick response.

I found that some orders are not according to updated\_at and If you provide me your email id then I can send you json response which is pulled from API.

Thanks

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [March 5, 2018, 3:34pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/4 "2018-03-05T15:34:42Z")

</div>

To clarify, the problem appears to be: when an order is updated in the app, its not appearing at the top of the list when your app performs a GET request?

---

<div class="post-metadata">

**Author:** ![techosunny](https://avatars.discourse-cdn.com/v4/letter/t/00F991/32.png) [@techosunny](https://developer-forum.veeqo.com/u/techosunny)\
**Post date:** [March 5, 2018, 3:41pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/5 "2018-03-05T15:41:43Z")

</div>

When order is updated in veeqo and it’s not appear top or initial pages…  
Case:  
Like, when order is updated on veeqo. It’s updated\_at attributes updates but it’s not found in initial pages while making request to orders endpoint.

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [March 5, 2018, 3:48pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/6 "2018-03-05T15:48:07Z")

</div>

It looks like orders in `awaiting_fulfillment` are sorted by `created_at` not `updated_at`

---

<div class="post-metadata">

**Author:** ![techosunny](https://avatars.discourse-cdn.com/v4/letter/t/00F991/32.png) [@techosunny](https://developer-forum.veeqo.com/u/techosunny)\
**Post date:** [March 5, 2018, 3:49pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/7 "2018-03-05T15:49:16Z")

</div>

Do you please fix this soon?

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [March 5, 2018, 3:56pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/8 "2018-03-05T15:56:10Z")

</div>

this is unlikely to be changed at all soon. You can get the most recently updated orders by using the `&updated_at_min=2016-03-01%2011%3A10%3A01` parameter in the request, to look for orders updated today.

What is the purpose of your application? How important is it that orders are sorted by `updated_at`?

---

<div class="post-metadata">

**Author:** ![techosunny](https://avatars.discourse-cdn.com/v4/letter/t/00F991/32.png) [@techosunny](https://developer-forum.veeqo.com/u/techosunny)\
**Post date:** [March 5, 2018, 3:58pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/9 "2018-03-05T15:58:33Z")

</div>

I tried that updated\_at\_min but it’s seem not working. I build that for my client.

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [March 5, 2018, 4:02pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/10 "2018-03-05T16:02:09Z")

</div>

not working how?

what is the application designed to? I’m wondering if there is a work around we can find.

---

<div class="post-metadata">

**Author:** ![techosunny](https://avatars.discourse-cdn.com/v4/letter/t/00F991/32.png) [@techosunny](https://developer-forum.veeqo.com/u/techosunny)\
**Post date:** [March 5, 2018, 4:06pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/11 "2018-03-05T16:06:17Z")

</div>

Basically, application looking for new orders or orders update and it will use veeqo data for different purpose. One of major requirement is generating shipping label. When order is packed then we need to detect and generate label.

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [March 5, 2018, 4:37pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/12 "2018-03-05T16:37:54Z")

</div>

How many orders are regularly in `awaiting_fulfillment` for this customer?

Could it be simpler to get all orders in `awaiting_fulfillment` and then just look for the ones that have `"picked_completely":true`

---

<div class="post-metadata">

**Author:** ![techosunny](https://avatars.discourse-cdn.com/v4/letter/t/00F991/32.png) [@techosunny](https://developer-forum.veeqo.com/u/techosunny)\
**Post date:** [March 6, 2018, 1:25pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/13 "2018-03-06T13:25:45Z")

</div>

I guess they don’t have too many.

I believe, It’ll be working for current situation.  
Thanks

---

<div class="post-metadata">

**Author:** ![techosunny](https://avatars.discourse-cdn.com/v4/letter/t/00F991/32.png) [@techosunny](https://developer-forum.veeqo.com/u/techosunny)\
**Post date:** [April 5, 2018, 11:03am UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/14 "2018-04-05T11:03:11Z")

</div>

Hey Phil,

I want to get latest orders data and it’ll be irrespective of an order status. How can I achieve this?

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [April 6, 2018, 1:14pm UTC](https://developer-forum.veeqo.com/t/default-orders-sorting-criteria-on-orders-endpoint/98/15 "2018-04-06T13:14:23Z")

</div>

Would that not just be polling `/orders` with a GET request?
