Skip to content
BolderBolder API
Esc
navigateopen⌘Jpreview

Update variant

Updates an existing variant. You can also look up the variant by sku instead of id by passing ?sku=YOUR_SKU as a query parameter. Requires admin scope.

PUT/shops/{shop_id}/variants/{id}
Authorization
AuthorizationBearer token (JWT) · headerrequired
OAuth 2.0 Bearer token. Obtain via `POST https://auth.onbolder.com/oauth/token`.
Scopes:admin
Path parameters
shop_idstringrequired
Shop ID or subdomain
idstringrequired
Variant ID (or any value when using `?sku=` lookup)
Query parameters
skustring
Look up variant by SKU instead of ID
Request body
requiredapplication/json
titlestring
Required on create
skustring
Must be unique within the shop
stockinteger
default: 1
available_if_no_stockinteger
`1` = always available, `0` = unavailable when out of stock
default: 1
Allowed:01
weight_in_gramsinteger
priceinteger
Override product price for this variant (cents)
price_comparisoninteger
Override comparison price for this variant (cents)
Responses
200Variant updated
idinteger
titlestring
skustring | null
priceinteger
price_comparisoninteger | null
stockinteger
available_if_no_stockboolean
weight_in_gramsinteger
_linksobject
422Validation errors
_classstring[]
_embeddedobject
Show properties
errorsobject[]
Show properties
Array of object
_classstring[]
fieldstring
messagesstring[]
Request
curl -X PUT "https://api.onbolder.com/v1/shops/string/variants/string" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "string",
  "sku": "string",
  "stock": 1,
  "available_if_no_stock": 0,
  "weight_in_grams": 0,
  "price": 0,
  "price_comparison": 0
}'
Response
{
  "id": 0,
  "title": "string",
  "sku": "string",
  "price": 0,
  "price_comparison": 0,
  "stock": 0,
  "available_if_no_stock": true,
  "weight_in_grams": 0,
  "_links": {}
}