Shopify - Retrieves multiple variant detail by multiple variant id
Asked Answered
G

2

10

Is there any way to get multiple variant details using multiple variant id in single shopify call. Actually, I want to get price of all product variant which are listed in order using shopify call.

I know following way for get single variant detail using id

GET /admin/variants/#{variant_id}.json

/admin/variants/808950810.json

Gentianella answered 1/12, 2018 at 11:59 Comment(0)
O
2

If you want the price of all the variants of a product, make one API call, and use the product ID. You'll get back all the variants, making it trivial to iterate through them to get prices.

Oech answered 1/12, 2018 at 15:36 Comment(2)
Thanks for your help. Currently working as you describe, But i am asking there is any way to get detail by multiple variant id like multiple product id.Gentianella
No. The relation is product has many variants.Variants are a leaf node. End of story.Oech
A
0

At the moment of writing, you can only retrieve all variants for a product via Shopify API.

If you're looking for retrieving unrelated, it's not possible via the API now.

But I think it's possible to submit multiple concurrent requests using a task queue or async requests. I'm also trying to speed up getting several variants at once.

Amputate answered 27/5, 2021 at 9:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.