curl --request PATCH \
--url https://api.shoppex.io/dev/v1/products/{uniqid}/variants/{variantUniqid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"price": 1,
"price_modifier": 123,
"stock": 123,
"stock_delimiter": "comma",
"license_period": 2,
"option_values": {},
"is_default": true,
"sort_order": 123
}
'{
"data": {
"id": "<string>",
"uniqid": "<string>",
"product_uniqid": "<string>",
"title": "<string>",
"description": "<string>",
"price": 123,
"price_modifier": 123,
"stock": 123,
"stock_delimiter": "<string>",
"license_period": 123,
"is_default": true,
"sort_order": 123,
"created_at": 123,
"updated_at": 123,
"option_values": null
}
}Update an existing variant
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/products/{uniqid}/variants/{variantUniqid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"price": 1,
"price_modifier": 123,
"stock": 123,
"stock_delimiter": "comma",
"license_period": 2,
"option_values": {},
"is_default": true,
"sort_order": 123
}
'{
"data": {
"id": "<string>",
"uniqid": "<string>",
"product_uniqid": "<string>",
"title": "<string>",
"description": "<string>",
"price": 123,
"price_modifier": 123,
"stock": 123,
"stock_delimiter": "<string>",
"license_period": 123,
"is_default": true,
"sort_order": 123,
"created_at": 123,
"updated_at": 123,
"option_values": null
}
}Use your API key with the Bearer scheme. Get your key from Dashboard → Settings → API Keys. Format: Authorization: Bearer shx_...
1 - 25565535x >= 0comma, newline x >= 1Show child attributes
Default Response
Show child attributes