younifyd
Menu

Update Custom Relationship

Update a custom relationship

PUT/pcm/custom-relationships/{customRelationshipSlug}

Use it in a workflow

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

Request

Path parameters

customRelationshipSlugstringrequired

A custom relationship slug.

Request body

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

dataobjectrequired
idstringrequired

The unique identifier of the custom relationship.

typestringrequired

This represents the type of resource object being returned. Always `custom-relationship`.

One ofcustom-relationship

attributesobjectrequired7 fields
json
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "type": "custom-relationship",
    "attributes": {
      "name": "Related Products",
      "slug": "CRP_related_products",
      "description": "A list of related products shown on the PDP.",
      "sort_order": 5,
      "external_name": "Similar items to consider",
      "external_description": "Check out these similar products that may also meet your needs or match your preferences.",
      "bi_directional": false
    }
  }
}

Response

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

dataobject
idstringrequired

A unique identifier generated when a custom relationship is created.

typestringrequired

This represents the type of resource object being returned. Always `custom-relationship`.

One ofcustom-relationship

attributesobjectrequired7 fields
metaobjectrequired2 fields
json
{
  "data": {
    "id": "string",
    "type": "custom-relationship",
    "attributes": {
      "name": "Related Products",
      "slug": "CRP_related_products",
      "description": "A list of related products shown on the PDP.",
      "sort_order": 5,
      "external_name": "Similar items to consider",
      "external_description": "Check out these similar products that may also meet your needs or match your preferences.",
      "bi_directional": false
    },
    "meta": {
      "owner": "store",
      "timestamps": {
        "created_at": "2024-01-10T20:16:35.343Z",
        "updated_at": "2024-01-10T20:16:35.343Z"
      }
    }
  }
}

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