, ,

Shopify Order Count and List APIs Do Not Return Correct Data

Well, not 100%, but it’s partially incorrect in my experience.

I was working on a Shopify-related project to make live integration for order fulfilment (in Shopify) with one of the shipping companies in Indonesia. One of the goal I want to achieve is to display the number of orders and list of orders. They should be filtered by two parameters: orders are paid, but not yet fulfilled.

I am not sure about the problem, because previously everything worked without any issues. If the count shows 5 orders, I can see the list of 5 orders. Previously, I used the 2020-07 API version. But, using the latest version (2020-10), I got the same results.

Order APIs

To retrieve the number of total orders, we can use /admin/api/2020-10/orders/count.json API endpoint. Because I need to get the paid and unfulfilled orders, I add two parameters: financial_status=paid and fulfillment_status=unfulfilled. I got this following response:

"count": 4

To retrieve list of orders with the filters I want, I use /admin/api/2020-10/orders.json API endpoint. Adding same parameters (financial_status=paid and fulfillment_status=unfulfilled), I expect to get all paid and unfulfilled orders. But I got nothing in the response.

"orders": []

It does not always empty, but sometime the API gives less number of orders. Maybe I should check again with different parameters.