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.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Api orders

Api orders

Schwinn
Visitor
2 0 0

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

 

thanks

Replies 3 (3)

Dive
Shopify Partner
23 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.

E-commerce analytics should be easier, that is why we have created diveanalytics.co
Schwinn
Visitor
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."}}

Dive
Shopify Partner
23 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.

E-commerce analytics should be easier, that is why we have created diveanalytics.co