Add a product variation

POST {{baseUrl}}/products/:id/variations

Adds a new product variation.

Request Body

{"name"=>"<string>", "prices"=>["<object>", "<object>"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;success&quot;:true,&quot;data&quot;:{&quot;id&quot;:2,&quot;name&quot;:&quot;Upgraded Mechanical Pencil&quot;,&quot;product_id&quot;:1,&quot;prices&quot;:[{&quot;product_variation_id&quot;:2,&quot;price&quot;:5,&quot;currency&quot;:&quot;EUR&quot;,&quot;cost&quot;:2,&quot;direct_cost&quot;:3,&quot;notes&quot;:&quot;This is the price for the upgraded mechanical pencil&quot;}]}}