Api orders

Schwinn
New Member
2 0 0

Is it possible to filter the vendor property, in the orders api?

 

thanks

0 Likes
Dive
Excursionist
19 1 1

Hello @Schwinn 

 

Which API do you plan to use ?

With the rest API, you can not filter inside a line_items. You need to pull data first and iterate with specific filters you want to apply inside your script.

But with GraphQl it seems to be ok.
Here is a forum's post where you can find information about the syntax to query in GraphQl and apply filters.

 

Hope it will help !

Thomas.

0 Likes
Schwinn
New Member
2 0 0

Thanks in advance,

A new question came up, I can't page this url.

/admin/api/2021-07/orders.json?page=1&limit=25

{"errors":{"page":"page cannot be passed. See https:\/\/help.shopify.com\/api\/guides\/paginated-rest-results?locale=en-US for more information."}}

0 Likes
Dive
Excursionist
19 1 1

Hello @Schwinn 

 

In Shopify API, pagination is not based on passing an argument page=x.
By default, you 'll have orders sorted by created_at fields.

If you want to have a pagination, you can use those fields  Shopify documentation  ->

Capture d’écran 2021-10-01 à 12.22.39.pngCapture d’écran 2021-10-01 à 12.23.05.pngCapture d’écran 2021-10-01 à 12.23.14.png

Tips : inside of you request, always add status=any -> /admin/api/2021-07/orders.json?status=any&limit=25

Or you 'll have discrepancies.

 

Hope it helps !

Thomas.

0 Likes