Get all nodes in a hierarchy
GET/pcm/hierarchies/:hierarchyID/nodes
A fully paginated view of all nodes in a hierarchy regardless of depth.
Request
Path Parameters
A unique identifier for the hierarchy.
Query Parameters
Possible values: <= 10000
The number of records to offset the results by.
Possible values: <= 10000
The number of records per page. The maximum limit is 100.
Responses
- 200
- 400
- 404
- 500
Successfully returns the node's children
- application/json
- Schema
- Example (from schema)
- get-all-nodes
Schema
- Array [
- ]
data object[]
An array of nodes.
The unique identifier of a node.
Possible values: [node
]
This represents the type of resource object being returned. Always node
.
attributes object
The name of the node, such as Ranges
or Refrigerators
. Names must be unique among sibling nodes in the hierarchy. Otherwise, a name can be non-unique within the hierarchy and across multiple hierarchies.
A description for a node.
A slug for the node. Slugs must be unique among sibling nodes in the hierarchy. Otherwise, a slug can be non-unique within the hierarchy and across multiple hierarchies.
You can curate your products in your nodes product lists. Product curation allows you to promote specific products within each node in a hierarchy, enabling you to create unique product collections in your storefront.
locales object
Product Experience Manager supports localization of hierarchies and nodes. If you store supports multiple languages, you can localize hierarchy and node names and descriptions.
property name* object
A three-letter language code that represents the name of language you have used.
A localized hierarchy or node name.
A localized hierarchy or node description.
relationships object
Relationships allow you to move between requests. Includes links to the child nodes and products associated with a hierarchy or node.
children object
The child nodes related to the resource.
An array of child nodes.
links object
Links allow you to move between requests.
A link to a related resource.
parent object
The parent node related to the resource
data object
The parent node
Possible values: [node
]
This represents the type of resource object being returned. Always node
.
The unique identifier of a node.
products object
The products related to the resource.
An array of products.
links object
Links allow you to move between requests.
A link to a related resource.
meta object
The sort order value. The node with the highest value of sort_order
is displayed first. For example, a node with a sort_order
value of 3
appears before a node with a sort_order
value of 2
. See Sorting Nodes in a hierarchy.
The date and time a node is created.
The date and time a node was updated.
The name of the parent of the node if one exists.
Possible values: [store
, organization
]
The node owner, either organization
or store
.
meta object
results object
Contains the results for the entire collection.
Total number of results for the entire collection.
links object
Links are used to allow you to move between requests.
Always the first page.
This is null
if there is only one page.
This is null
if there is only one page.
This is null
if you on the first page.
{
"data": [
{
"id": "string",
"type": "node",
"attributes": {
"name": "string",
"description": "string",
"slug": "string",
"curated_products": [
"string"
],
"locales": {}
},
"relationships": {
"children": {
"data": [
null
],
"links": {
"related": "string"
}
},
"parent": {
"data": {
"type": "node",
"id": "string"
}
},
"products": {
"data": [
null
],
"links": {
"related": "string"
}
}
},
"meta": {
"sort_order": 0,
"created_at": "2020-09-22T09:00:00",
"updated_at": "2020-09-22T09:00:00",
"parent_name": "string",
"owner": "store"
}
}
],
"meta": {
"results": {
"total": 30
}
},
"links": {
"first": "/pcm/hierarchies?page[offset]=0&page[limit]=10",
"last": "/pcm/hierarchies?page[offset]=20&page[limit]=10",
"next": "/pcm/hierarchies?page[offset]=10&page[limit]=10",
"prev": "/pcm/hierarchies?page[offset]=8&page[limit]=10"
}
}
{
"data": [
{
"id": "9ea0de15-3347-43dd-8faa-cd32f44a04c7",
"type": "node",
"attributes": {
"description": "Latest Ballet Shoes",
"locales": {
"fr-FR": {
"name": "Chaussons de ballet",
"description": "Dernières chaussures de ballet"
}
},
"name": "Ballet Shoes",
"slug": "ballet-shoes"
},
"relationships": {
"children": {
"data": [],
"links": {
"related": "/hierarchies/6183d10c-94b5-4caa-9f12-2f14cb738d41/nodes/9ea0de15-3347-43dd-8faa-cd32f44a04c7/children"
}
},
"products": {
"data": [],
"links": {
"related": "/hierarchies/6183d10c-94b5-4caa-9f12-2f14cb738d41/nodes/9ea0de15-3347-43dd-8faa-cd32f44a04c7/products"
}
}
},
"meta": {
"created_at": "2024-01-11T19:19:50.087Z",
"owner": "store",
"sort_order": 5,
"updated_at": "2024-01-11T19:56:53.695Z"
}
},
{
"type": "node",
"id": "b2f5e53e-de3c-4548-98da-120f8b185d34",
"attributes": {
"description": "All Dress Shoes",
"locales": {
"fr-FR": {
"name": "Chaussures habillées",
"description": "Toutes les chaussures habillées"
}
},
"name": "Dress Shoes",
"slug": "dress-shoes"
},
"relationships": {
"children": {
"data": [],
"links": {
"related": "/hierarchies/6183d10c-94b5-4caa-9f12-2f14cb738d41/nodes/b2f5e53e-de3c-4548-98da-120f8b185d34/children"
}
},
"products": {
"data": [],
"links": {
"related": "/hierarchies/6183d10c-94b5-4caa-9f12-2f14cb738d41/nodes/b2f5e53e-de3c-4548-98da-120f8b185d34/products"
}
}
},
"meta": {
"created_at": "2024-01-11T19:50:21.729Z",
"owner": "store",
"sort_order": 3,
"updated_at": "2024-01-11T19:50:21.729Z"
}
}
],
"meta": {
"results": {
"total": 2
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- bad-request
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Bad Request",
"detail": "Could not parse the supplied filter",
"status": "400"
}
]
}
Bad Request. Not Found.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"status": "500",
"title": "Internal Server Error",
"detail": "There was an internal server error, you can report with your request id.",
"request_id": "635da56d-75a1-43cd-b696-7ab119756b3a"
}
]
}