What's your biggest current challenge? Have your say in Community Polls along the right column.
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 - Private app retrieve orders

Rest API - Private app retrieve orders

CoreyNg
Shopify Partner
41 4 1

Hi all,

 

We are going to use the Rest API to retrieve our order info and save them to our in-house system. I try to create a Private App to do so. The problem is no matter Postman nor Python can only retrieve an empty JSON. Be I can retrieve the orders from the browser (orders.json). One of the test orders was made today. It definitely is within 60 days.  I try to put the parameter status=any still can't help. Can anyone teach me how can it be worked on Postman or Python?

 

Thanks in advance

 

Postman with empty result.

CoreyNg_0-1642673462063.png

Browser result.

CoreyNg_1-1642674030565.png

Python Code:

import requests

def chk_orders():
    r = requests.get(shop_url)
    print(r.json())
    return

chk_orders()
 
Result:
{'orders': []}

 

Reply 1 (1)

CoreyNg
Shopify Partner
41 4 1

I really want to delete this post. I feel so embarrassing.........

Please accept my apology. I found that I input another store's hyperlink.......><"