Update Product Modifier

Update a product modifier

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

Path Parameters

NameTypeDescription

variationId

string

The ID of the variation belonging to this modifier

optionId

string

The ID of the option belonging to the modifier

modifierId

string

The ID of the modifier to be updated

Headers

NameTypeDescription

Authorization

string

The Bearer token used to grant access to the API

Request Body

NameTypeDescription

id

string

The unique identifier for this modifier

type

string

Represents the type of object being updated (should be modifier)

modifier_type

string

price_increment, price_decrement, price_equals, sku_builder, slug_builder, description_equals, description_prepend, description_append, commoditytype, name_equals, name_prepend, name_append, slug_equals, slug_prepend, slug_append, sku_equals, sku_prepend, sku_append, status

value

string

A payload specific to the type of modifier

{
    "data": {
    	"type": "product-variation",
        "id": "0c02ca9f-27be-48a8-89d9-cd7c30699343",
        "name": "Colour",
        "options": [
            {
            	"id": "9000b3bb-4626-4521-9b1a-e89def0ca44a",
            	"name": "Blue",
                "description": "Our second most popular color",
                "modifiers": [
                    {
                        "id": "74004ddf-4521-4d4b-8c86-04fcd45294b0",
                        "type": "name_equals",
                        "value": "Updated product name"
                    }
                ]
            }
        ],
        "relationships": {
            "options": {
                "data": [
                    {
                        "id": "9000b3bb-4626-4521-9b1a-e89def0ca44a",
                        "type": "option"
                    }
                ]
            }
        }
    }
}
curl -X PUT https://api.moltin.com/v2/variations/:variationId/options/:optionId/modifiers/:modifierId \
     -H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json" \
     -d $'{
      "data": {
        "type": "modifier",
        "id": "MODIFIER_ID",
        "modifer_type": "name_equals"
        "value": "Updated product name"
      }
    }'

Last updated