New Shopify Certification now available: Liquid Storefronts for Theme Developers

REST API Order Endpoint via Private app not returning all orders

fwrush3
Visitor
2 0 0

I have setup a "private" app for [mystore].myshopify.com. To start with I'm using that private app to pull order and product data using the Shopify REST API into a sql database for a custom application I am developing. Everything is working perfectly except I'm only getting 30 days of orders from the Orders endpoint. All the documentation I have reviewed stated that private apps automatically do not have any restrictions on pulling all orders, so I'm not sure what the issue is. I am getting some orders beyond the 30 days, but they are only the orders that have a financial status of "partially refunded" or "refunded" or "pending." Any assistance on a setting I am missing or something I am doing incorrectly would be appreciated.

Reply 1 (1)
fwrush3
Visitor
2 0 0

I found the following post that resolved my issue:

https://community.shopify.com/c/shopify-apis-and-sdks/api-order-json-not-containing-all-orders/m-p/8... 

By default the Orders endpoint only returns "open" orders. You have to specify a "&status=any" parameter as part of the endpoint.