How can I request more than 250 pieces of order data

kaipengliu
New Member
12 0 0

hey,

    guys!

When I request the following api (/admin/api/2021-04/orders.json?status=any). to query the order list。

I found that only 250 results can be queried at most

But I saw that the api request parameter table contains such a parameter 'since_id'

Then, no matter what value I pass to since_id. I always get the same result. It seems that it has no effect on the request

Except since_id, I did not find more useful parameters from the request parameter list to achieve my purpose:'request more than 250 pieces of order data'

 

Do you have any good suggestions or ideas?

thanks 

Your suggestions are very important to me. This will be of great help to my work

 

 

0 Likes
Jason
Shopify Expert
10270 144 1941

Have you looked at using pagination via the link data in the header response?
https://shopify.dev/tutorials/make-paginated-requests-to-rest-admin-api

 

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
kaipengliu
New Member
12 0 0

 

thank you for your help @ Jason

But I still ran into problems. When I use the following api path to request server resources

This is the URL path I used : 'admin/api/2021-04/orders.json?status=any&limit=50&page_info=1'

This is the url path of my complete request : 'https://keyouyun.myshopify.com/admin/api/2021-04/orders.json?status=any&limit=50&page_info=1'

However, the server returned me an error message like this : {"page_info": "Invalid value."}

I understand page_info means current_page_number

So, am I doing something wrong

0 Likes