younifyd
Menu

Duplicate Hierarchy

Duplicate a hierarchy

POST/pcm/hierarchies/{hierarchyID}/duplicate_job

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Duplicate Hierarchy action (under PIM).
  3. Fill in the fields below, then reference the result from later steps as {{duplicateHierarchy.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
typestring

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

One ofhierarchy

attributesobject4 fields
json
{
  "data": {
    "type": "hierarchy",
    "attributes": {
      "name": "string",
      "description": "string",
      "slug": "string",
      "include_products": false
    }
  }
}

Response

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

dataobject
idstringrequired

A unique identifier generated when a job is created.

typestringrequired

This represents the type of resource object being returned. Always `pim-job`.

One ofpim-job

attributesobjectrequired6 fields
metaobjectrequired5 fields
json
{
  "data": {
    "id": "string",
    "type": "pim-job",
    "attributes": {
      "started_at": "2020-09-22T09:00:00.000Z",
      "completed_at": "2020-09-22T09:00:00.000Z",
      "created_at": "2020-09-22T09:00:00.000Z",
      "updated_at": "2020-09-22T09:00:00.000Z",
      "type": "child-products",
      "status": "pending"
    },
    "meta": {
      "x_request_id": "string",
      "copied_from": "string",
      "hierarchy_id": "string",
      "file_locations": [
        "string"
      ],
      "filter": "string"
    }
  }
}

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