BizKitHub
DocsAPI ReferenceProduct/bff/product/product-variant-create
postProductAdmin BFF

/bff/product/product-variant-create

Creates a new variant for a product. The variant code is generated from the provided code (or from product code + name) and deduplicated. Each variant gets a unique relation hash for identification.

ProductpostBffProductProduct-variant-create

Parameters

JSON body

Request body

application/json
mainProductCodestringRequired

Product code to add the variant to.

Examplemy-product
namestringRequired

Variant display name.

Length: 1
ExampleSize XL
codestringRequired

Variant code (will be slugified and deduplicated).

Length: 1
Examplexl
eanstringOptional

Variant EAN barcode.

Example8594000000456
pricenumberOptional

Variant price with VAT.

Example399.9
priceAddnumberOptional

Additional price on top of the base product price.

Example50

Response schema

1 status code documented

200Success
successbooleanRequired

Whether the variant was created.

Response example

application/json
{
  "success": false
}

Request example

POST /bff/product/product-variant-create

post
curl -X POST "https://api.bizkithub.com/bff/product/product-variant-create" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "mainProductCode": "my-product",
  "name": "Size XL",
  "code": "xl",
  "ean": "8594000000456",
  "price": 399.9,
  "priceAdd": 50
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key