Variations Relationship
Create Variations Relationship(s)
POST
https://api.moltin.com/v2/products/:productId/relationships/variations
Path Parameters
Name | Type | Description |
---|---|---|
productId | string | The ID of the product you wish to relate to the variation(s). |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token used to access the API. |
Request Body
Name | Type | Description |
---|---|---|
data[].type | string | Represents the type of object (should be product-variation). |
data[].id | string | The ID of the product-variation. |
Update Variation Relationship(s)
PUT
https://api.moltin.com/v2/products/:productId/relationships/variations
Replace the relationships between a product and a variation. 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 variation(s). |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token used to access the API. |
Request Body
Name | Type | Description |
---|---|---|
data[].type | string | Represents the type of object (should be product-variation). |
data[].id | string | The ID of the variation. |
Delete Variation Relationship(s)
DELETE
https://api.moltin.com/v2/products/:productId/relationships/variations
Remove a relationship between a Product and a Variation(s). This deletes the relationships specified in the payload.
Path Parameters
Name | Type | Description |
---|---|---|
productId | string | The ID of the product you wish to relate to the variations(s) |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token used to access the API. |
Request Body
Name | Type | Description |
---|---|---|
data[].type | string | Represents the type of object (should be product-variation). |
data[].id | string | The ID of the variation. |
Last updated