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: >= 0
and <= 10000
The number of records to offset the results by.
Possible values: >= 0
and <= 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 (auto)
- 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"
}
]
}
],
"custom_relationships": [
null
],
"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": {
"main_images": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "file",
"file_name": "file_name.jpg",
"mime_type": "image/jpeg",
"file_size": 36000,
"public": true,
"meta": {
"timestamps": {
"created_at": "2023-10-11T13:02:25.293Z"
},
"dimensions": {
"width": 1800,
"height": 1000
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/files/ddc28c74-a7df-46be-b262-8fa69a6e7d52"
},
"link": {
"href": "https://files-eu.epusercontent.com/e8c53cb0-120d-4ea5-8941-ce74dec06038/f8cf26b3-6d38-4275-937a-624a83994702.png",
"meta": {
"results": {
"total": 2
}
}
}
}
],
"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"
}
]
}
],
"custom_relationships": [
null
],
"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": {}
}
],
"files": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "file",
"file_name": "file_name.jpg",
"mime_type": "image/jpeg",
"file_size": 36000,
"public": true,
"meta": {
"timestamps": {
"created_at": "2023-10-11T13:02:25.293Z"
},
"dimensions": {
"width": 1800,
"height": 1000
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/files/ddc28c74-a7df-46be-b262-8fa69a6e7d52"
},
"link": {
"href": "https://files-eu.epusercontent.com/e8c53cb0-120d-4ea5-8941-ce74dec06038/f8cf26b3-6d38-4275-937a-624a83994702.png",
"meta": {
"results": {
"total": 2
}
}
}
}
]
},
"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 (auto)
- 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 (auto)
- 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 (auto)
- 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
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://euwest.api.elasticpath.com/pcm/hierarchies/:hierarchyID/nodes/:nodeID/products");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());