Get a Hierarchy
GET
Get a Hierarchy
https://api.moltin.com/pcm/hierarchies/:hierarchyId
Retrieves the specified hierarchy.
Parameters
Path parameters
Name | Required | Type | Description |
---|---|---|---|
hierarchyId | Required | string | The unique identifier of the hierarchy. |
Query parameters
Name | Required | Type | Description |
---|---|---|---|
include | Optional | string | To include all the nodes in the hierarchy within the response, add:include=children |
Headers
Name | Required | Type | Description |
---|---|---|---|
Authorization | Required | string | The Bearer token required to get access to the API. |
Request Example
curl -X GET https://api.moltin.com/pcm/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007 \
-H "Authorization: Bearer XXXX" \
Response Example
200 OK
{
"data": {
"type": "hierarchy",
"id": "0e119de2-5fb0-4bca-9b84-b3fc6c903007",
"attributes": {
"description": "Free standing appliances",
"name": "Major Appliances",
"slug": "Major-Appliances-MA0"
},
"relationships": {
"children": {
"data": [],
"links": {
"related": "/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007/children"
}
}
},
"meta": {
"created_at": "2023-02-07T14:01:51.247Z",
"owner": "store",
"updated_at": "2023-02-07T14:01:51.247Z"
}
}
}