Menu
Product Association Id
Create a Relationship between a Product with one or more Products
POST
/pcm/products/{productID}/custom-relationships/{customRelationshipSlug}Use it in a workflow
- Add a step and choose the Elastic Path connector.
- Pick the Product Association Id action (under PIM).
- Fill in the fields below, then reference the result from later steps as
{{productAssociationId.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"data": [
{
"id": "string",
"type": "product",
"attributes": {
"sort_order": 5
}
}
]
}
Response
Returns 201 with an object. Read it in later steps with {{productAssociationId.response.data.<field>}}.
{
"meta": {
"associated_products": [
"68c48149-0e94-4ef2-93d5-8d5f3774980a",
"ab4826d1-4a5a-4951-a2a5-98058899f891"
],
"products_not_associated": [
{
"ID": "97b7fac2-91dd-4755-81b0-bdffe8e7eabd",
"Details": "could not find product"
},
{
"ID": "a0ef3291-2ec1-4d7d-9d6d-1705ae01bb99",
"Details": "product already has 5 custom relationships, cannot associate more as it has reached the limit of 5 custom relationships"
},
{
"ID": "bde79675-4783-40b7-8a7e-ac6df41459c6",
"Details": "product already has 5 custom relationships, cannot associate more as it has reached the limit of 5 custom relationships"
},
{
"ID": "aaddd5f4-a5f8-42e8-be9a-097986f22e58",
"Details": "exceeded maximum allowed associations (2000). Please review and try again"
}
],
"owner": "store",
"timestamps": {
"created_at": "2024-08-08T09:29:08.295Z",
"updated_at": "2024-08-08T09:29:08.295Z"
}
}
}
Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.
Was this page helpful?