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?
Solved! Go to the solution
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.
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
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
@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).
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?
User | Count |
---|---|
13 | |
12 | |
6 | |
6 | |
5 |