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] orders endpoint do not return any results

Solved

[REST] orders endpoint do not return any results

azhmakin
Shopify Partner
5 0 2

Issue:

Cannot fetch orders data for selected shops.

`/orders.json` returns an empty array.

 

Given:

An app that has granted appropriate permissions for the shops.

Development store that has various orders (different financial statuses).

 

When:

Trying to fetch orders list an empty array is returning.

 

Tested on 3 development stores.

Only for 1 of them, this issue is reproducible. 

For the other 2 all work as expected (identical settings and set up).

 

Webhooks for orders paid has been fired. (for a store that returning an empty array in the response of `/orders.json`).

Other data (like shops info `/shop.json` successfully returning data)

 

Details:

App permissions list (scopes):  'read_orders''write_orders', 'read_all_orders'

API_VERSION: "2019-10"  (tried with latest, - the same behavior)

REQUEST: GET  `https://<developer-store-name>.myshopify.com/admin/api/2019-10/orders.json` (also tried with different filters, - the same behavior)

 

Shops list:

`wavetest0207.myshopify.com` - cannot fetch orders

`mystorelionvs2.myshopify.com`- successfully fetching orders

 

 

Accepted Solution (1)

Jivan_Suhagiya
Shopify Partner
595 82 127

This is an accepted solution.

Hi @azhmakin 
did you tried query param status=any? for ex. orders.json?status=any
because I think default its returning only open orders.

If helpful then please Like and Accept Solution.
Email: suhagiyajivan1992@gmail.com
Skype: jivan.suhagiya
First kind of Checkout Reminder APP: https://apps.shopify.com/checkout-reminder

View solution in original post

Replies 2 (2)

Jivan_Suhagiya
Shopify Partner
595 82 127

This is an accepted solution.

Hi @azhmakin 
did you tried query param status=any? for ex. orders.json?status=any
because I think default its returning only open orders.

If helpful then please Like and Accept Solution.
Email: suhagiyajivan1992@gmail.com
Skype: jivan.suhagiya
First kind of Checkout Reminder APP: https://apps.shopify.com/checkout-reminder
azhmakin
Shopify Partner
5 0 2

Thanks @Jivan_Suhagiya 

It was that