Get all hierarchies
GET/pcm/hierarchies
Get all hierarchies
Request
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
- 500
Returns a list of all hierarchies.
- application/json
- Schema
- Example (from schema)
- list-hierarchies
Schema
- Array [
- ]
data object[]
A unique identifier generated when a hierarchy is created.
Possible values: [hierarchy
]
This represents the type of resource object being returned. Always hierarchy
.
attributes object
The name of a hierarchy, such as Major Appliances
.
A description for a hierarchy.
A unique slug for a hierarchy.
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
children object
The child nodes related to the hierarchy.
An array of child nodes.
links object
Links allow you to move between requests.
A link to a related resource.
meta object
The date and time a hierarchy is created.
The date and time a hierarchy is updated.
Possible values: [store
, organization
]
The owner of a resource, either organization
or store
.
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.
meta object
results object
Contains the results for the entire collection.
Total number of results for the entire collection.
{
"data": [
{
"id": "string",
"type": "hierarchy",
"attributes": {
"name": "string",
"description": "string",
"slug": "string",
"locales": {}
},
"relationships": {
"children": {
"data": [
null
],
"links": {
"related": "string"
}
}
},
"meta": {
"created_at": "2020-09-22T09:00:00",
"updated_at": "2020-09-22T09:00:00",
"owner": "store"
}
}
],
"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"
},
"meta": {
"results": {
"total": 30
}
}
}
{
"data": [
{
"type": "hierarchy",
"id": "6183d10c-94b5-4caa-9f12-2f14cb738d41",
"attributes": {
"description": "Shoes Category",
"locales": {
"fr-FR": {
"name": "Chaussures",
"description": "Catégorie de chaussures"
}
},
"name": "Shoes",
"slug": "shoes"
},
"relationships": {
"children": {
"data": [],
"links": {
"related": "/hierarchies/6183d10c-94b5-4caa-9f12-2f14cb738d41/children"
}
}
},
"meta": {
"created_at": "2024-01-10T20:16:35.343Z",
"owner": "store",
"updated_at": "2024-01-10T20:30:50.867Z"
}
}
],
"links": {
"last": "/pcm/hierarchies?page[offset]=29&page[limit]=1",
"next": "/pcm/hierarchies?page[offset]=1&page[limit]=1"
},
"meta": {
"results": {
"total": 30
}
}
}
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"
}
]
}
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"
}
]
}