younifyd
Menu

Create Variation

Create a variation

POST/pcm/variations

Use it in a workflow

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

Request

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
json
{
  "data": {
    "type": "product-variation",
    "attributes": {
      "name": "string",
      "sort_order": 0
    }
  }
}

Response

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

dataobject
idstringrequired

A unique identifier generated when a variation is created.

typestringrequired

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

One ofproduct-variation

attributesobjectrequired2 fields
metaobjectrequired3 fields
json
{
  "data": {
    "id": "string",
    "type": "product-variation",
    "attributes": {
      "name": "string",
      "sort_order": 0
    },
    "meta": {
      "owner": "organization",
      "created_at": "2020-09-22T09:00:00.000Z",
      "updated_at": "2020-09-22T09:00:00.000Z"
    }
  }
}

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