POST

This API lets you create/replace SVI galleries of a product by ID.

HTTP request:

POST: /wp-json/wc/svi/<product_id>

Paramater data to create a SVI Gallery:

curl -X POST https://example.com/wp-json/wc/svi/<product_id> \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "data": [
   {
      "slugs":[
         "svidefault" // attribute slug
      ],
      "imgs":[
         "https://yourdomain.com/hoodie_7_front-1.jpg", //full url or attachment ID
         "http://yourdomain.com/logo.png",
         "348",
         "344"
      ],
      "loop_hidden":false
   },
   {
      "slugs":[
         "black"
      ],
      "imgs":[
         "346",
         "http://yourdomain.com/wp-content/uploads/2019/09/second_image.png",
         "344",
         "351"
      ],
      "loop_hidden":false
   },
   {
      "slugs":[
         "blue",
         "large"
      ],
      "imgs":[
         "348",
         "349",
         "350",
         "360",
         "347"
      ],
      "loop_hidden":false
   },
   {
      "slugs":[
         "grey"
      ],
      "imgs":[
         "353",
         "352",
         "354",
         "359"
      ],
      "loop_hidden":false
   },
   {
      "slugs":[
         "red"
      ],
      "imgs":[
         "357",
         "356",
         "358",
         "355"
      ],
      "loop_hidden":false
   }
]
}

Response example (bool):

true or false