How can I get all orders by /admin/orders.json filter by fulfillment_status

Solved
Highlighted
Shopify Partner
6 0 1

I want to get all the orders(fulfilled and unfulfilled) from the api url, but I only get the unfulfilled orders by /admin/orders.json?fulfillment_status=any.

And I also get the unfulfilled orders by /admin/orders.json?fulfillment_status=shipped.

WHY?

1 Like
Highlighted
Shopify Partner
98 0 16

As far as I can see, the fulfillment_status "any" is the default (https://help.shopify.com/api/reference/order#index).

Doesn't it work without adding the filter?

I faced the "issue", that the default filter for "status" is not "any" but "open".

Hope this helps.

Looga.io
0 Likes
Highlighted
Shopify Partner
6 0 1

I mean the fulfillment_status, not the order status.

It doesn't work without the fulfillment_status filter, it only returns the unfulfilled orders but no fulfilled orders.

0 Likes
Highlighted
Shopify Partner
45 0 9

After some testing, it appears that the "fullfilment_status" filter is designed to act as a secondary filter, you mainly use after the status filter. I currently have 3 open orders, 1 cancelled and 85 closed. Here are the results of my testing using this filter.

admin/orders.json?fulfillment_status=shipped (no results, because without a filter on the default orders API, it is trying to check the open orders to see if they have been shipped)

admin/orders.json?status=any&fulfillment_status=shipped (85 results, because I have told it to bring back all orders using status=any and out of all of them, 85 are one\shipped)

admin/orders.json?fulfillment_status=unshipped (3 results, because without a filter on the default orders API, it is checking the open orders for to see if they are unshipped, which they are).

admin/orders.json?status=any&fulfillment_status=unshipped (4 results, because I have asked for all orders using status=any which includes my 3 open orders and the 1 cancelled order which has not been fulfilled\shipped)

admin/orders.json?status=any&fulfillment_status=partial (no results because I don't do partial fulfilment orders)

admin/orders.json?fulfillment_status=any (returns 3, because the default API call returns only open orders)

admin/orders.json?status=any&fulfillment_status=any (returns 89, because it is now saying, give me all orders with any fulfilment status)

Hopefully, this is useful to you and anyone else. 

Like mentioned previously by someone else, it appears to achieve what you think you want to achieve if you stick with status=any to bring back every order (fulfilled an unfulfilled). At the moment apart from wanting to return partially fulfilled orders, I can see no reason to have to use the fulfillment_status filter.

If using order status (status=any) definitely isn't what you want to do, and you believe fulfilment status is what you want, then maybe explain the scenario and outcome you are trying to achieve. Maybe we can come up with a solution for you.

Regards

Gareth

5 Likes
Highlighted
Shopify Partner
6 0 1

Thank you very much! Gareth.

0 Likes
Highlighted
Shopify Partner
3 0 0

Hey guys is there any way to get the total value of the fullfilled or unfullfilled orders?


@Gareth_Doherty1 wrote:

After some testing, it appears that the "fullfilment_status" filter is designed to act as a secondary filter, you mainly use after the status filter. I currently have 3 open orders, 1 cancelled and 85 closed. Here are the results of my testing using this filter.

admin/orders.json?fulfillment_status=shipped (no results, because without a filter on the default orders API, it is trying to check the open orders to see if they have been shipped)

admin/orders.json?status=any&fulfillment_status=shipped (85 results, because I have told it to bring back all orders using status=any and out of all of them, 85 are one\shipped)

admin/orders.json?fulfillment_status=unshipped (3 results, because without a filter on the default orders API, it is checking the open orders for to see if they are unshipped, which they are).

admin/orders.json?status=any&fulfillment_status=unshipped (4 results, because I have asked for all orders using status=any which includes my 3 open orders and the 1 cancelled order which has not been fulfilled\shipped)

admin/orders.json?status=any&fulfillment_status=partial (no results because I don't do partial fulfilment orders)

admin/orders.json?fulfillment_status=any (returns 3, because the default API call returns only open orders)

admin/orders.json?status=any&fulfillment_status=any (returns 89, because it is now saying, give me all orders with any fulfilment status)

Hopefully, this is useful to you and anyone else. 

Like mentioned previously by someone else, it appears to achieve what you think you want to achieve if you stick with status=any to bring back every order (fulfilled an unfulfilled). At the moment apart from wanting to return partially fulfilled orders, I can see no reason to have to use the fulfillment_status filter.

If using order status (status=any) definitely isn't what you want to do, and you believe fulfilment status is what you want, then maybe explain the scenario and outcome you are trying to achieve. Maybe we can come up with a solution for you.

Regards

Gareth


 

0 Likes
Highlighted
Shopify Partner
1840 177 707

@Vexebot Using Admin REST API orders endpoint no - unless you fetch all and do the math yourself in your app. If you have access to ShopifyQL then yes (minimum Shopify Advanced plan required).

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes
Highlighted
New Member
4 0 0

Hi , i cannot get the order which is fulfilled using this status

0 Likes
Highlighted
New Member
4 0 0

Is there any limit for the orders on api, and i am getting same data for every query why is that , i tried all combinations of query params but i get the same response again and again, and i can't even find the order which i want but it's status is fulfilled

Please help!

Thanks

0 Likes
Highlighted
Shopify Partner
521 38 109

I have found some quirks using the GraphQL API in this regard as well. Below is a screen shot, where I am trying to pull the 5 most recent orders that have been fulfilled. Perhaps I'm mistaken in my query syntax since perhaps this is interpreted as a loose search. Where the characters fulfilled  are contained in unfulfilled as well as partially_fulfilled?

 

Order Query.jpg

0 Likes