Skip to main content
POST
Create Variant

Headers

authorization
string | null
X-API-Key
string | null
X-Stella-Merchant-Id
string | null

Path Parameters

product_id
string<uuid>
required

Body

application/json

Schema for creating a variant.

price
required
Required range: x >= 0
sku
string | null
Maximum string length: 100
barcode
string | null
Maximum string length: 100
option1
string | null
Maximum string length: 100
option2
string | null
Maximum string length: 100
option3
string | null
Maximum string length: 100
compare_at_price
Required range: x >= 0
cost_per_item
Required range: x >= 0
inventory_quantity
integer
default:0
Required range: x >= 0
inventory_policy
string
default:deny
Pattern: ^(deny|continue)$
low_stock_threshold
integer
default:10
Required range: x >= 0
weight
weight_unit
string
default:kg
Pattern: ^(kg|g|lb|oz)$
requires_shipping
boolean
default:true
image_url
string | null
available
boolean
default:true

Response

Successful Response

Schema for variant in responses.

id
string<uuid>
required
product_id
string<uuid>
required
sku
string | null
required
barcode
string | null
required
option1
string | null
required
option2
string | null
required
option3
string | null
required
price
string
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
compare_at_price
string | null
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
cost_per_item
string | null
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
inventory_quantity
integer
required
inventory_policy
string
required
low_stock_threshold
integer
required
weight
string | null
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
weight_unit
string
required
requires_shipping
boolean
required
image_url
string | null
required
available
boolean
required
is_low_stock
boolean
required
is_out_of_stock
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required