Sellvik / developers
Admin API

Variants

Per-product variants — size, colour, etc.

A variant represents a sellable SKU of a product. A product with no variants has its own stock / sku / price. A product with variants delegates those to the variant rows — the parent product's stock becomes a roll-up.

Variant object

{
  "id": "v9d8c7b6-...",
  "productId": "f3a7e9b8-...",
  "name": "Medium / Emerald",
  "sku": "KRT-EM-M",
  "price": "1490.00",
  "comparePrice": "1990.00",
  "stock": 4,
  "optionValues": {
    "size": "M",
    "color": "Emerald"
  },
  "isActive": true,
  "createdAt": "2026-05-20T08:30:00.000Z"
}

Create a variant

POST /api/v1/admin/products/{id}/variants

Scope: products:write

Request body

{
  "name": "Medium / Emerald",
  "sku": "KRT-EM-M",
  "price": "1490.00",
  "comparePrice": "1990.00",
  "stock": 4,
  "optionValues": { "size": "M", "color": "Emerald" }
}
FieldRequiredNotes
nameyesDisplay label — typically "<size> / <color>".
skuyesUnique within the shop.
priceyesMoney string.
comparePricenoMoney string.
stocknoDefault 0.
optionValuesnoFree-form key/value, used for option-grid rendering.

Response

201 Created with the variant.

Errors

StatusCodeWhen
400invalid_bodyValidation failed.
404not_foundProduct doesn't exist in this shop.
409duplicate_skuSKU already exists for another product/variant.

Get a variant

GET /api/v1/admin/products/{id}/variants/{variantId}

Scope: products:read


Update a variant

PATCH /api/v1/admin/products/{id}/variants/{variantId}

Scope: products:write

Any subset of the create-time fields.

curl -X PATCH "https://api.sellvik.app/api/v1/admin/products/f3a7.../variants/v9d8..." \
  -H "Authorization: Bearer <admin-key>" \
  -H "Content-Type: application/json" \
  -d '{ "stock": 10 }'

Stock changes here bypass the inventory audit log. Prefer POST /v1/admin/inventory/adjust when the change has a reason worth recording (sale, return, breakage, recount).


Soft-delete a variant

DELETE /api/v1/admin/products/{id}/variants/{variantId}

Scope: products:write

Returns 204. Removes the variant from the storefront immediately; existing order lines retain their reference.

On this page