Skip to content
BolderBolder API
Esc
navigateopen⌘Jpreview

Update a variant

Variant names are set via option1/option2/option3. On update, stocks accepts available_units/total_units in addition to location_id.

PUT/products/{product_id}/variants/{id}
Authorization
AuthorizationBearer token (JWT) · headerrequired
Path parameters
product_idstringrequired
idstringrequired
Variant ID or SKU
Request body
requiredapplication/json
skustring
barcode_numberstring
option1string
option2string
option3string
option_valuesobject
Custom variant option values, keyed by `option1`/`option2`/`option3`.
option_asset_idsobject
Asset IDs to associate with each option value.
product_asset_idsinteger[]
Product image asset IDs to associate with this variant.
colorstring
regular_priceinteger
sale_priceinteger
costinteger
Cost in cents (for margin reporting, not shown to buyers).
statusstring
Allowed:visiblehidden
available_if_no_stockboolean
weight_in_gramsinteger
unit_quantitynumber
online_stockinteger
stocksobject[]
Show properties
Array of object
location_idinteger
available_unitsinteger
total_unitsinteger
allows_negativeboolean
Responses
200Variant updated
_linksHalLinks
idinteger
product_idinteger
namestring
Display name, computed from option1/option2/option3.
statusstring
Allowed:visiblehidden
skustring
barcode_numberstring
option1string
option2string
option3string
currency_codestring
regular_priceinteger
Regular price in cents
sale_priceinteger | null
Sale price in cents
priceinteger
Effective price in cents (sale_price if set, else regular_price)
online_stockinteger
all_stockinteger
available_if_no_stockboolean
weight_in_gramsinteger
unit_quantitynumber
colorstring
costinteger
profitinteger
stocksobject[]
Per-location stock breakdown
Show properties
Array of object
location_idinteger
available_unitsinteger
total_unitsinteger
Request
curl -X PUT "https://api.onbolder.com/v2/products/string/variants/string" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "regular_price": 7999
}'
Response
{
  "_links": {
    "property1": {
      "href": "string",
      "templated": true,
      "method": "get",
      "title": "string",
      "type": "string"
    },
    "property2": {
      "href": "string",
      "templated": true,
      "method": "get",
      "title": "string",
      "type": "string"
    }
  },
  "id": 0,
  "product_id": 0,
  "name": "string",
  "status": "visible",
  "sku": "string",
  "barcode_number": "string",
  "option1": "string",
  "option2": "string",
  "option3": "string",
  "currency_code": "string",
  "regular_price": 0,
  "sale_price": 0,
  "price": 0,
  "online_stock": 0,
  "all_stock": 0,
  "available_if_no_stock": true,
  "weight_in_grams": 0,
  "unit_quantity": 0,
  "color": "string",
  "cost": 0,
  "profit": 0,
  "stocks": [
    {
      "location_id": 0,
      "available_units": 0,
      "total_units": 0
    }
  ]
}