From 6294b0c227d7ef549437cf92d918a503965d34cf Mon Sep 17 00:00:00 2001 From: Tarun Vijwani Date: Wed, 7 Sep 2022 15:49:10 +0530 Subject: [PATCH] Add steps to retrieve products variations in Store API docs (https://github.com/woocommerce/woocommerce-blocks/pull/7076) --- plugins/woocommerce-blocks/src/StoreApi/docs/products.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/products.md b/plugins/woocommerce-blocks/src/StoreApi/docs/products.md index 6e5eeeee29d..465adb6f96c 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/products.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/products.md @@ -191,6 +191,14 @@ curl "https://example-store.com/wp-json/wc/store/v1/products/34" } ``` +## Product Variations + +By default, Store API excludes product variations. You can retrieve the variations for a product by using the `type=variation`. + +```sh +curl "https://example-store.com/wp-json/wc/store/v1/products?type=variation" +``` + ---