Discussing APIs and development related to customers, discounts, and order management.
I'm trying to query all orders that were fulfilled on the previous day however I'm having issues with the pagination.
I query the orders endpoint with the following parameters.
status: closedfulfillment_status: fulfilledcreated_at_min: December 1 2019 12amupdated_at_min: yesterday 12amupdated_at_max: today 12amlimit: 250fields: id, line_items, shipping_address
Note: All date fields are correctly formatted
After the first query and 250 items are returned I then add in the since_id as required in the docs.
My next set of items are only 249 and if I update the since_id it returns an empty array for orders leaving the total orders to be 499 returned.
If I update the limit to 50 i have the same issues with a total of 99 orders returned.Is there something i'm missing on the pagination?
If you are using the REST API then there is now cursor-based pagination that can be used. Described here --> https://shopify.dev/tutorials/make-paginated-requests-to-rest-admin-api. Hope this helps!
Thanks for the response. I'll look into it further and hopefully I can find a solution that works with it.