Skip to main content

POST /v1/items/{id}/variants

Scope

write_items

Request parameters

NameInTypeRequiredDescription
idpathstringrequiredID of the target resource.
Idempotency-KeyheaderstringrequiredIdempotency key (required). A UUID v4 is recommended. Resending the same key replays the original result, and the response carries Idempotent-Replay: true. Sending a different body with the same key returns 422, so always retry with the identical request.
skubodystringrequiredSKU for this variant.
axis_valuesbodyarrayrequiredAxis values for the variant being added. Give a value for every axis of the item, and no others.
pricebodyobjectoptionalPrice for this variant. null falls back to the item's price.
inventorybodyintegeroptionalInitial stock only. After creation, update it through the stock endpoint with variant_id.
discount_ratebodyintegeroptionalDiscount rate for this variant, in percent.
statusbodyenum(activeinactive)optional

Response example

{
"data": {
"id": "string",
"item_id": "string",
"sku": "string",
"name": "string",
"price": {
"amount": 0,
"currency": "JPY"
},
"discount_rate": 0,
"inventory": 0,
"status": "active",
"axis_values": [
{
"axis": "string",
"value": "string"
}
]
}
}

Description

Add a variant. Only combinations of the item's existing variation axes are accepted. (write_items)

Error response example

{
"error": {
"code": "insufficient_scope",
"message": "requires scope 'write_items'",
"request_id": "req_01H..."
}
}

Possible errors: 400 / 401 / 403 / 404 / 409 / 422 / 503