younifyd
Menu

Update Variation

Update a variation

PUT/pcm/variations/{variationID}

Use it in a workflow

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

Request

Path parameters

variationIDstringrequired

A unique identifier for the variation.

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`.

One ofproduct-variation

attributesobjectrequired2 fields
idstringrequired

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

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

Response

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

dataobject
idstringrequired

A unique identifier for a variation.

typestringrequired

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

One ofproduct-variation

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

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