Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Update Variants

Updates variants of a specified product.

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Manage Products permission scope.

PATCH

https://www.wixapis.com/stores/v1/products/{id}/variants

Path Params

NAME
TYPE
DESCRIPTION
id
Required

string

ID of the product with managed variants.

Body Params

NAME
TYPE
DESCRIPTION
variants

Array<object>

Response Object

NAME
TYPE
DESCRIPTION
variants

Array<object>

List of the product's variants.

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Request

curl

Copy Code
1curl -X PATCH \
2 'https://www.wixapis.com/stores/v1/products/1044e7e4-37d1-0705-c5b3-623baae212fd/variants' \
3 --data-binary '{
4 "variants": [
5 {
6 "choices": {
7 "Size": 'S',
8 "Color": 'Blue'
9 },
10 "price": 100
11 }
12 ]
13 }' \
14 -H 'Content-Type: application/json' \
15 -H 'Authorization: <AUTH>'

Response

json

1
2{"variants": [{
3 "id": "00000000-0000-0020-0005-92338aaf6c4a",
4 "choices": {
5 "Size": "S",
6 "Color": "Blue"
7 },
8 "variant": {
9 "priceData": {
10 "currency": "USD",
11 "price": 100,
12 "discountedPrice": 100,
13 "formatted": {
14 "price": "$100.00",
15 "discountedPrice": "$100.00"
16 }
17 },
18 "weight": 0,
19 "sku": "",
20 "visible": true
21 }
22}]}