Child Relationships

post
Create Child Brand Relationships

https://api.moltin.com/v2/brands/:brandId/relationships/children
Create a relationship to a parent brand. If any relationship(s) already exists, new ones will be added.
Request
Response
Path Parameters
brandId
required
string
The ID of the brand you wish to make relationships to
Headers
Authorization
required
string
The Bearer token used to access the API
Body Parameters
type
required
string
The type of related object (should be be brand)
id
required
string
The ID of the parent brand
200: OK
cURL
curl -X POST https://api.moltin.com/v2/brands/:brandId/relationships/children \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": [
{
"type": "brand",
"id": "8a43aea7-79f0-4bcf-9bc8-a0f5d3d3642c"
}
]
}'

put
Update Child Brand Relationship

https://api.moltin.com/v2/brands/:brandId/relationships/children
Request
Response
Path Parameters
brandId
required
string
The ID of the brand you wish to make relationships
Headers
Authorization
required
string
The Bearer token used to access the API
Body Parameters
type
required
string
The type of related object (should be brand).
id
required
string
The ID of the parent brand.
200: OK
cURL
curl -X PUT https://api.moltin.com/v2/brands/:brandId/relationships/children \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": [
{
"type": "brand",
"id": "c902aea9-ec90-4fdd-8084-3c2d879a2c52"
}
]
}'

delete
Delete Child Brand Relationship

https://api.moltin.com/v2/brands/:brandId/relationships/parent
Request
Response
Path Parameters
brandId
required
string
The ID of the brand you wish to update relationships to
Headers
Authorization
required
string
The Bearer token used to access the API
Body Parameters
data
required
object
data[].type
required
string
The type of related object. (should be brand)
data[].id
required
string
The ID of the child brand.
200: OK
cURL
curl -X DELETE https://api.moltin.com/v2/brands/:brandId/relationships/parent \
-H "Authorization: Bearer XXXX" \
-d $'{
"data": [{
"type": "brand",
"id": "c902aea9-ec90-4fdd-8084-3c2d879a2c52"
}]
}'