Update Product Variation Option

Update a Product Variation Option

PUT https://api.moltin.com/v2/variations/:variationId/options/:optionId

Path Parameters

NameTypeDescription

optionId

string

The ID of the option.

variationId

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

id

string

The ID of the option.

name

string

A human readable description of the option.

description

string

A human readable description of the option

type

string

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

{  
  "data":{  
    "id":"1feab4d8-25b3-40d3-8843-8056713dadfc",
    "type":"option",
    "description":"Our other most popular color",
    "name":"Green",
    "relationships":{
      "modifiers":{
        "data":[
          {  
            "type":"sku-builder",
            "id":"a43593a6-92fe-4953-bf4e-a99524918839"
          }
        ]
      }
    }
  }
}
curl -X PUT https://api.moltin.com/v2/variations/684bceee-0ee3-4f43-ac32-50bb44c1eee5/options/39148bc3-3028-4196-9350-1b4ac927c9d6 \
     -H "Authorization: Bearer XXXX" \
     -H "Content-type: application/json" \
     -d $'{
        "data": {
            "id": "39148bc3-3028-4196-9350-1b4ac927c9d6",
            "type": "option",
            "name": "Green",
            "description": "Our other most popular color"
        }
    }

Last updated