Get a node's products
GEThttps://euwest.api.elasticpath.com/pcm/hierarchies/:hierarchyID/nodes/:nodeID/products
Returns the products associated with the specified hierarchy node from a published catalog. Products must be in a live status. If the products have been curated using the update a hierarchy node endpoint, then the products are returned in the order specified in the curated_products
attribute in the body of the update a hierarchy node request. A product that is curated has the "curated_product": true attribute displayed.
Request
Path Parameters
A unique identifier for the hierarchy.
A unique identifier for the node.
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 products
- application/json
- Schema
- Example (from schema)
- get-node-products
Schema
data object[]
included object
meta object
{
"data": [
{
"id": "string",
"type": "product",
"attributes": {
"name": "string",
"description": "string",
"slug": "string",
"sku": "string",
"status": "live",
"commodity_type": "physical",
"upc_ean": "string",
"mpn": "string",
"external_ref": "string",
"locales": {},
"tags": [
"string"
],
"extensions": {},
"custom_inputs": {},
"build_rules": {
"default": "include",
"include": [
[
"string"
]
],
"exclude": [
[
"string"
]
]
},
"components": {}
},
"meta": {
"created_at": "2020-09-22T09:00:00",
"updated_at": "2020-09-22T09:00:00",
"owner": "organization",
"variations": [
{
"id": "string",
"name": "string",
"options": [
{
"id": "string",
"name": "string",
"description": "string"
}
]
}
],
"child_variations": [
{
"id": "string",
"name": "string",
"sort_order": 0,
"options": [
{
"id": "string",
"name": "string",
"description": "string"
}
],
"option": {
"id": "string",
"name": "string",
"description": "string"
}
}
],
"product_types": [
"parent"
],
"variation_matrix": {}
},
"relationships": {}
}
],
"included": {
"component_products": [
{
"id": "string",
"type": "product",
"attributes": {
"name": "string",
"description": "string",
"slug": "string",
"sku": "string",
"status": "live",
"commodity_type": "physical",
"upc_ean": "string",
"mpn": "string",
"external_ref": "string",
"locales": {},
"tags": [
"string"
],
"extensions": {},
"custom_inputs": {},
"build_rules": {
"default": "include",
"include": [
[
"string"
]
],
"exclude": [
[
"string"
]
]
},
"components": {}
},
"meta": {
"created_at": "2020-09-22T09:00:00",
"updated_at": "2020-09-22T09:00:00",
"owner": "organization",
"variations": [
{
"id": "string",
"name": "string",
"options": [
{
"id": "string",
"name": "string",
"description": "string"
}
]
}
],
"child_variations": [
{
"id": "string",
"name": "string",
"sort_order": 0,
"options": [
{
"id": "string",
"name": "string",
"description": "string"
}
],
"option": {
"id": "string",
"name": "string",
"description": "string"
}
}
],
"product_types": [
"parent"
],
"variation_matrix": {}
},
"relationships": {}
}
]
},
"meta": {
"results": {
"total": 2
}
}
}
{
"data": [
{
"type": "product",
"id": "9c85b276-09b4-488e-a59c-c561bae14c9e",
"attributes": {
"commodity_type": "physical",
"custom_inputs": {
"back": {
"name": "T-Shirt Back",
"validation_rules": [
{
"type": "string",
"options": {
"max_length": 50
}
}
],
"required": false
},
"front": {
"name": "T-Shirt Front",
"validation_rules": [
{
"type": "string",
"options": {
"max_length": 50
}
}
],
"required": false
}
},
"description": "T-shirt.",
"mpn": "1234-5678-TTTT",
"name": "T-Shirt",
"sku": "97805",
"slug": "97805",
"status": "live",
"upc_ean": "12345656",
"tags": [
"tag1",
"tag2"
],
"extensions": {
"products(size)": {
"widthMM": 600,
"fuelType": "electric",
"hasUKPlug": true,
"online": null
}
}
},
"relationships": {
"children": {
"data": [],
"links": {
"self": "/products/9c85b276-09b4-488e-a59c-c561bae14c9e/children"
}
},
"component_products": {
"data": [],
"links": {
"self": "/products/9c85b276-09b4-488e-a59c-c561bae14c9e/relationships/component_products"
}
},
"files": {
"data": [],
"links": {
"self": "/products/9c85b276-09b4-488e-a59c-c561bae14c9e/relationships/files"
}
},
"main_image": {
"data": null
},
"templates": {
"data": [],
"links": {
"self": "/products/9c85b276-09b4-488e-a59c-c561bae14c9e/relationships/templates"
}
},
"variations": {
"data": [],
"links": {
"self": "/products/9c85b276-09b4-488e-a59c-c561bae14c9e/relationships/variations"
}
}
},
"meta": {
"created_at": "2022-08-18T14:25:57.391Z",
"owner": "store",
"product_types": [
"standard"
],
"updated_at": "2022-08-18T14:25:57.391Z"
}
}
],
"meta": {
"results": {
"total": 1
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- bad-request
Schema
errors undefined[]required
{
"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
errors undefined[]required
{
"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
errors undefined[]required
{
"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"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X GET 'https://euwest.api.elasticpath.com/pcm/hierarchies/:hierarchyID/nodes/:nodeID/products' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'