Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

REST API Order Endpoint via Private app not returning all orders

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.