Next Commerce
API ReferenceProducts

Products Variants Update

PUT
/products/variants/{id}/

Authorization

oauth2 catalogue:write
AuthorizationBearer <token>

Generate an Access Token through Settings > API Access for single store access or use the Authorization Code flow with your partner App Client ID. Use required permission scopes for API endpoint access. Example Authorization: Bearer 123

In: header

Scope: catalogue:write

Path Parameters

id*integer

A unique integer value identifying this Product.

Header Parameters

X-29next-API-Version*string
Default"2024-04-01"
Value in"2024-04-01"
allow_backorders?boolean

Continue selling when out of stock.

image?|
metadata?|
prices?array<>
requires_shipping?boolean
sku?|

Stock Keeping Unit

track_stock?boolean

Track inventory quantities at fulfillment locations.

unit_cost?|
Match^-?\d{0,10}(?:\.\d{0,2})?$
Formatdecimal
upc?|

Universal Product Code

variant_attribute_values*array<>

Response Body

application/json

curl -X PUT "https://example.29next.store/api/admin/products/variants/0/" \  -H "X-29next-API-Version: 2024-04-01" \  -H "Content-Type: application/json" \  -d '{    "variant_attribute_values": [      {        "name": "string",        "value": "string"      }    ]  }'
{
  "allow_backorders": true,
  "date_created": "2019-08-24T14:15:22Z",
  "date_updated": "2019-08-24T14:15:22Z",
  "id": 0,
  "images": "string",
  "inventory_availability": "in_stock",
  "metadata": {},
  "prices": [
    {
      "currency": "string",
      "price": "string",
      "retail": "string",
      "subscription": "string",
      "subscription_suggested_downsell": "string"
    }
  ],
  "product_id": 0,
  "purchase_availability": "available",
  "requires_shipping": true,
  "sku": "string",
  "stockrecords": [
    {
      "id": 0,
      "location_id": 0,
      "low_stock_threshold": 2147483647,
      "num_allocated": 0,
      "num_in_stock": -2147483648
    }
  ],
  "title": "string",
  "track_stock": true,
  "unit_cost": "string",
  "upc": "string",
  "variant_attribute_values": [
    {
      "code": "string",
      "name": "string",
      "value": "string"
    }
  ]
}