Create Product Variation Option

post
Create a Product Variation Option

https://api.moltin.com/v2/variations/:id/options
Request
Response
Path Parameters
id
required
string
The ID of the variation belonging to this option
Headers
Authorization
required
string
The Bearer token to grant access to the API.
Body Parameters
type
required
string
Represents the type of the object being created. (should be option)
name
required
string
A human readable name for this variation option
description
required
string
A human readable description of the option
201: Created
{
"data":{
"type":"option",
"id":"615e4e5a-e43d-4679-9900-191af4724f6d",
"name":"Paint colour",
"description":"Our most popular color",
"relationships":{
"modifiers":{
"data":[
{
"type":"sku-builder",
"id":"aabc3e8e-c6a6-42aa-a64b-9a7dbefedd9f"
}
]
}
}
}
}
cURL
curl -X POST https://api.moltin.com/v2/variations/:variationId/options \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"description": "Our most popular color",
"name": "Blue",
"type": "product-variation-option"
}
}'