PATCH /v1/commerce/products/{productID}/variants/{variantID}
PATCH
/v1/commerce/products/{productID}/variants/{variantID}Authorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredPath parameters
productIDstringrequiredvariantIDstringrequiredRequest body
requiredapplication/jsondigital_delivery_urlstringimage_urlstringoption_valuesobjectprice_amountinteger<int64>min 0
price_delta_amountinteger<int64>skustringstock_qtyinteger<int32>min 0
titlestringrequiredResponses
200OK
digital_delivery_urlstringidstringrequiredimage_urlstringoption_valuesobjectprice_amountinteger<int64>price_delta_amountinteger<int64>requiredproduct_idstringrequiredskustringstock_qtyinteger<int32>requiredtitlestringrequireddefaultError
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X PATCH "/v1/commerce/products/string/variants/string" \
-H "Content-Type: application/json" \
-d '{
"digital_delivery_url": "string",
"image_url": "string",
"option_values": {},
"price_amount": 0,
"price_delta_amount": 0,
"sku": "string",
"stock_qty": 0,
"title": "string"
}'const response = await fetch("/v1/commerce/products/string/variants/string", {
method: "PATCH",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"digital_delivery_url": "string",
"image_url": "string",
"option_values": {},
"price_amount": 0,
"price_delta_amount": 0,
"sku": "string",
"stock_qty": 0,
"title": "string"
})
});import requests
response = requests.patch(
"/v1/commerce/products/string/variants/string",
headers={
"Content-Type": "application/json"
},
json={
"digital_delivery_url": "string",
"image_url": "string",
"option_values": {},
"price_amount": 0,
"price_delta_amount": 0,
"sku": "string",
"stock_qty": 0,
"title": "string"
},
)Response
{
"digital_delivery_url": "string",
"id": "string",
"image_url": "string",
"option_values": {},
"price_amount": 0,
"price_delta_amount": 0,
"product_id": "string",
"sku": "string",
"stock_qty": 0,
"title": "string"
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}