Collection Relationships
Create Collection Relationship(s)
POST
https://api.moltin.com/v2/products/:productId/relationships/collections
Create a product relationship to one or many Collections. If any relationships already exist, the one's made in the request will be added to them.
Path Parameters
Name | Type | Description |
---|---|---|
productId | string | The ID of the product you wish to relate to the collection(s). |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token to grant access to the API. |
Request Body
Name | Type | Description |
---|---|---|
data[].type | string | Represents the type of object (should be collection). |
data[].id | string | The ID of the collection. |
Update Collection Relationship(s)
PUT
https://api.moltin.com/v2/products/:productId/relationships/collections
Replace the relationships between a Product and a Collection. Unlike a POST to this endpoint, a PUT overrides any existing relationships.
Path Parameters
Name | Type | Description |
---|---|---|
productId | string | The ID of the product you wish to relate to the collection(s). |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token to grant access to the API. |
Request Body
Name | Type | Description |
---|---|---|
data[].type | string | Represents the type of object (should be collection). |
data[].id | string | The ID of the collection. |
Delete Collection Relationship(s)
DELETE
https://api.moltin.com/v2/products/:productId/relationships/collections
Remove a relationship between a Product and a Collection(s). This deletes the relationship specified in the payload.
Path Parameters
Name | Type | Description |
---|---|---|
productId | string | The ID of the product you wish to relate to the collection(s). |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token to grant access to the API. |
Request Body
Name | Type | Description |
---|---|---|
data[].type | string | Represents the type of object (should be collection). |
data[].id | string | The ID of the collection. |
Last updated