PXM Products/
PXM Product Variations/
PXM Product Variation Options API/
Update Option

Update Option

PUT Update a Product Variation Option

https://api.moltin.com/pcm/variations/:variationId/options/:optionId

Use the same OptionId in the path and the body to avoid errors.

Parameters

Path parameters

NameRequiredTypeDescription
variationIdRequiredstringThe ID of the variation that consists of the option.
optionIdRequiredstringThe ID of the option that you want to update.

Headers

NameRequiredTypeDescription
AuthorizationRequiredstringThe Bearer token required to get access to the API.

Body

NameRequiredTypeDescription
optionIdRequiredstringThe ID of the option that you want to update.
nameRequiredstringThe name of the option.
descriptionRequiredstringThe description of the option.
typeRequiredstringThe type of resource object. You must use product-variation-option.

Request Example

curl -X PUT https://api.moltin.com/pcm/variations/684bceee-0ee3-4f43-ac32-50bb44c1eee5/options/39148bc3-3028-4196-9350-1b4ac927c9d6 \
     -H "Authorization: Bearer XXXX" \
     -H "Content-type: application/json" \
     -d $'{
        {
        "data": {
          "type": "product-variation-option",
          "id": "39148bc3-3028-4196-9350-1b4ac927c9d6",
          "attributes": {
            "name": "Blue",
            "description": "This is a color."
        }
    }
}'

Response Example

200 OK

{
    "data": {
        "type": "product-variation-option",
        "id": "2950cae3-1050-4c43-9fbd-2aa60dc5c249",
        "attributes": {
            "name": "Blue",
            "description": "This is a color."
        }
    }
}

Was this helpful?

Previous
Create an Option

Learn

Docs