Create variant
POST
/products/{productId}/variants
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/products//variants' \
--header 'X-Identifier: {{x_identifier}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"variants": [
{
"sku": "Testi123ngxx1",
"stock": "291",
"weight": "12",
"stock_price": 100.25,
"supplier_sku": "Lev-art-100",
"prices": [
{
"price": 125.77,
"compare_price": 133.33,
"currency_id": 1,
"tier": 1
}
],
"gtin": "Gtion-valle",
"options": [
{
"type": "Färg",
"value": "Blå"
},
{
"type": "Storlek",
"value": "S"
}
]
},
{
"sku": "Testingdfj2",
"stock": "291",
"weight": "12",
"stock_price": 10000,
"supplier_sku": "Lev-art-100",
"prices": [
{
"price": 30000,
"compare_price": 42000,
"currency_id": 1,
"tier": 1
}
],
"compare_price": 35000,
"gtin": "Gtion-valle",
"options": [
{
"type": "Färg",
"value": "Blå"
},
{
"type": "Storlek",
"value": "M"
}
]
},
{
"sku": "Testinx3123xg3",
"stock": "291",
"weight": "12",
"stock_price": 10000,
"supplier_sku": "Lev-art-100",
"prices": [
{
"price": 32000,
"compare_price": 42000,
"currency_id": 1,
"tier": 1
}
],
"compare_price": 35000,
"gtin": "Gtion-valle",
"options": [
{
"type": "Färg",
"value": "Blå"
},
{
"type": "Storlek",
"value": "XL"
}
]
}
]
}'
Response Response Example
{}
Request
Path Params
productId
string
required
Header Params
X-Identifier
string
optional
Example:
{{x_identifier}}
Authorization
string
optional
Example:
Bearer {{token}}
Accept
string
optional
Example:
application/json
Content-Type
string
optional
Example:
application/json
Body Params application/json