Create Product Variation Option

Create a Product Variation Option

POST https://api.moltin.com/v2/variations/:id/options

Path Parameters

NameTypeDescription

id

string

The ID of the variation belonging to this option

Headers

NameTypeDescription

Authorization

string

The Bearer token to grant access to the API.

Request Body

NameTypeDescription

type

string

Represents the type of the object being created. (should be option)

name

string

A human readable name for this variation option

description

string

A human readable description of the option

{  
  "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 -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"
        }
    }'

Last updated