younifyd
Menu

Update Hierarchy

Update a hierarchy

PUT/pcm/hierarchies/{hierarchyID}

Use it in a workflow

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

Request

Path parameters

hierarchyIDstringrequired

A unique identifier for the hierarchy.

Request body

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

dataobjectrequired
idstringrequired

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

typestringrequired

This represents the type of resource object being returned. Always `hierarchy`.

One ofhierarchy

attributesobjectrequired6 fields
json
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "type": "hierarchy",
    "attributes": {
      "name": "string",
      "description": "string",
      "slug": "string",
      "admin_attributes": {
        "cost_of_goods": "42.0",
        "charge_type": "credit card"
      },
      "shopper_attributes": {
        "cost_of_goods": "42.0",
        "charge_type": "credit card"
      },
      "locales": {}
    }
  }
}

Response

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

dataobject
idstringrequired

A unique identifier generated when a hierarchy is created.

typestringrequired

This represents the type of resource object being returned. Always `hierarchy`.

One ofhierarchy

attributesobjectrequired6 fields
relationshipsobjectrequired1 fields
metaobjectrequired5 fields
json
{
  "data": {
    "id": "string",
    "type": "hierarchy",
    "attributes": {
      "name": "string",
      "description": "string",
      "slug": "string",
      "admin_attributes": {
        "cost_of_goods": "42.0",
        "charge_type": "credit card"
      },
      "shopper_attributes": {
        "cost_of_goods": "42.0",
        "charge_type": "credit card"
      },
      "locales": {}
    },
    "relationships": {
      "children": {
        "data": [
          null
        ],
        "links": {
          "related": "string"
        }
      }
    },
    "meta": {
      "created_at": "2020-09-22T09:00:00.000Z",
      "updated_at": "2020-09-22T09:00:00.000Z",
      "owner": "store",
      "has_children": false,
      "breadcrumbs": [
        {
          "id": "string",
          "name": "string",
          "slug": "string",
          "locales": {}
        }
      ]
    }
  }
}

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