Product variations REST API
-
Hi,
Is there a way to get the variation data in the product end-point (wp-json/wc/v3/products/?include=1,2,3,4,5) without going through the variation endpoint (wp-json/wc/v3/products/(product_id)/variations) as in get the variations data for each product 1,2,3,4,5?
Thanks in advance!
-
Hello there,
You would need to check out this doc here: https://woocommerce.github.io/woocommerce-rest-api-docs/#product-variations to see if this would suit your needs.
I hope this helps.
-
Unfortunately that only works for variation ids within a single product. I want to pull in multiple products 1,2,3,4,5 and their variations.
-
Hello there,
Hmm, looking more closely at that doc, I’m not sure that would be possible.
What is it you’re trying to build exactly? Or if you have an example of what you’re trying to build, perhaps we can offer some insights.
Many thanks.
- The topic ‘Product variations REST API’ is closed to new replies.