younifyd
Menu

Update Variation Option

Update a variation option

PUT/pcm/variations/{variationID}/options/{optionID}

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Update Variation Option action (under PIM).
  3. Fill in the fields below, then reference the result from later steps as {{updateVariationOption.response.data}}.

Request

Path parameters

variationIDstringrequired

A unique identifier for the variation.

optionIDstringrequired

A unique identifier for the option.

Request body

Enter the body as JSON in the step's Body field.

dataobjectrequired
typestringrequired

This represents the type of resource object being returned. Always `product-variation-option`.

One ofproduct-variation-option

attributesobjectrequired3 fields
idstringrequired

The unique identifier of the option. Must match the option ID specified in the request path.

json
{
  "data": {
    "type": "product-variation-option",
    "attributes": {
      "name": "string",
      "description": "string",
      "sort_order": 0
    },
    "id": "00000000-0000-0000-0000-000000000000"
  }
}

Response

Returns 200 with an object. Read it in later steps with {{updateVariationOption.response.data.<field>}}.

dataobject
idstringrequired

The unique identifier generated when an option is created.

typestringrequired

This represents the type of resource object being returned. Always `product-variation-option`.

One ofproduct-variation-option

attributesobjectrequired3 fields

A variation option represents an option for selection for a single product-variation. For example, if your variation is `color`, you might have three possible options; red, green, and blue.

metaobjectrequired4 fields
json
{
  "data": {
    "id": "string",
    "type": "product-variation-option",
    "attributes": {
      "name": "string",
      "description": "string",
      "sort_order": 0
    },
    "meta": {
      "owner": "organization",
      "created_at": "2020-09-22T09:00:00.000Z",
      "updated_at": "2020-09-22T09:00:00.000Z",
      "modifiers": [
        {
          "id": "string",
          "type": "commodity_type",
          "value": "string",
          "seek": "string",
          "set": "string",
          "owner": "organization"
        }
      ]
    }
  }
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.