Create a Relationship between a Product with one or more Products
POST/pcm/products/:productID/custom-relationships/:customRelationshipSlug
- You can associate a product with up to 2000 other products.
- You do not need to attach a custom relationship to products beforehand, this will be done automatically by this endpoint.
- This is a partial update, so if you make a request to this endpoint multiple times with different products in each request, they will not be overwritten but will be appended to the related products list.
If you want to remove a relationship between products, see Delete a Relationship between a product with one or more products.
Prerequisites
- A Custom Relationship has been created, see create a Custom Relationship.
- A Product has been created for the relationship to be based from.
- One or many Product have been created for the product to relate to.
Request
Responses
- 201
- 400
- 403
- 404
- 409
- 422
- 500
Returns information related to associated products.
Bad request. The request failed validation.
Forbidden
Bad Request. Not Found.
Write conflict detected
Bad request. The request failed validation.
Internal server error. There was a system failure in the platform.