Batch update variants
Updates multiple existing variants in a single request (does not create new variants). Each entry in batch must include id (numeric variant ID or SKU) to match an existing variant; unmatched IDs are silently skipped. Stock fields use available_units/total_units (units is deprecated but still accepted).
POST
/products/{product_id}/variants/updatersAuthorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
product_idstringrequiredQuery parameters
shop_idintegerrequiredRequest body
requiredapplication/jsonbatchobject[]requiredShow propertiesHide properties
Array of
objectidstringrequiredExisting variant ID or SKU
titlestringAccepted (unlike the standalone update endpoint, which ignores it)
skustringregular_priceintegersale_priceintegerstatusstringAllowed:
visiblehiddenstocksobject[]Show propertiesHide properties
Array of
objectlocation_idintegeravailable_unitsintegertotal_unitsintegerResponses
201Variants processed
_embeddedobjectShow propertiesHide properties
valid_itemsobject[]Show propertiesHide properties
Array of
objectidintegertitlestringinvalid_itemsobject[]Show propertiesHide properties
Array of
objectidintegertitlestringRequest
curl -X POST "https://api.onbolder.com/v2/products/string/variants/updaters?shop_id=0" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"batch": [
{
"id": "201",
"title": "Small",
"regular_price": 7999
},
{
"id": "202",
"title": "Large",
"regular_price": 8999
}
]
}'const response = await fetch("https://api.onbolder.com/v2/products/string/variants/updaters?shop_id=0", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"batch": [
{
"id": "201",
"title": "Small",
"regular_price": 7999
},
{
"id": "202",
"title": "Large",
"regular_price": 8999
}
]
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/products/string/variants/updaters?shop_id=0",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"batch": [
{
"id": "201",
"title": "Small",
"regular_price": 7999
},
{
"id": "202",
"title": "Large",
"regular_price": 8999
}
]
},
)Response
{
"_embedded": {
"valid_items": [
{
"id": 0,
"title": "string"
}
],
"invalid_items": [
{
"id": 0,
"title": "string"
}
]
}
}