Get a node's products
GET/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
- Array [
- Array [
- ]
- Array [
- Array [
- ]
- ]
- Array [
- Array [
- ]
- ]
standard
- Astandard
product is a standalone product.parent
- Aparent
product is a product that has child products that have been built using theBuild Child Products
endpoint.child
- When you configure product variations and variation options forparent
products, thechild
products derived from theparent
products are automatically created in Commerce.bundle
- Abundle
is a purchasable product, comprising one or more standalone products (in other words, components) to be sold together.- MOD1
- MOD2
- Array [
- ]
- ]
- Array [
- Array [
- ]
- Array [
- Array [
- ]
- ]
- Array [
- Array [
- ]
- ]
standard
- Astandard
product is a standalone product.parent
- Aparent
product is a product that has child products that have been built using theBuild Child Products
endpoint.child
- When you configure product variations and variation options forparent
products, thechild
products derived from theparent
products are automatically created in Commerce.bundle
- Abundle
is a purchasable product, comprising one or more standalone products (in other words, components) to be sold together.- MOD1
- MOD2
- Array [
- ]
- ]
data object[]
A unique product ID that is generated when you create the product.
Possible values: [product
]
This represents the type of resource object being returned. Always product
.
attributes object
A name for the product.
A description for the product.
A label for the product that is used in the URL paths. A slug can contain A to Z, a to z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. By default, the product name is used as the slug.
The unique stock keeping unit of the product.
Possible values: [live
, draft
]
The status for the product, either draft
or live
.
Possible values: [physical
, digital
]
The commodity type, either physical
or digital
.
The universal product code or european article number of the product.
The manufacturer part number of the product.
The unique attribute associated with the product. This could be an external reference from a separate company system, for example. The maximum length is 2048 characters.
locales object
Product Experience Manager supports localization of products and hierarchies. If your store supports multiple languages, you can localize product names and descriptions. You can have as many locales as you want.
property name* object
A three-letter language code that represents the name of language you have used.
A localized name for the product.
A localized description for the product.
You can use product tags to store or assign a key word against a product. The product tag can then be used to describe or label that product. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on. A product can have up to 20 tags. A product tag can be up to 255 characters. Product tags must not contain any spaces or commas.
extensions object
property name* object
custom_inputs object
You use the custom_inputs
attribute to allow your shoppers to add custom text to a product when adding product items to their carts. This is useful, for example, if you have a product like a T-shirt that can be personalized or you sell greetings cards that can be printed with your shoppers personalized messages. See Personalizing Products.
property name* object
A name for the custom text field. You can rename this to something more representative of the input that shoppers are adding, for example, message
or front
.
A name for the custom text field.
The validation rules for the custom text.
This represents the type of the resource being returned.
The length of the custom input text field.
The number of characters the custom text field can be. You can specify a maximum length up to 255 characters, as the limit is 255 characters.
true
or false
depending on whether the custom text is required.
build_rules object
You can build a combination of child products associated with a product, based on build rules that you specify. This is useful, for example, if you have a variation option that you do not sell. This makes managing and building your child products quick and easy. See Using Build Rules.
Possible values: [include
, exclude
]
Specifies the default behaviour, either include
or exclude
.
An array of option IDs to include when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.
An array of option IDs to exclude when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.
components object
With Product Experience Manager, you can create and manage bundles. A bundle is a purchasable product, comprising of one or more products that you want to sell together. You can create multiple components within a bundle. Each component must have at least one or more options. Each option is a product and a quantity. See Bundles.
property name* object
The name of the component, such as games
. The bundle_configuration
uses the component name to reference a component. A component name should be relatively short and must not contain any special characters.
The component name. The component name is the name that is displayed in your storefront.
options object[]
The product options included in a component. This can be the ID of another bundle.
The unique ID of the product you want to add to a component.
This represents the type of object being returned. Always product
.
The number of this product option that a shopper must purchase.
The sort order of the options. The create a bundle
and update a bundle
endpoints do not sort the options. You can use the sort_order
attribute when programming your storefront to display the options in the order that you want.
Whether the product option is a default option in a bundle. Shoppers can select a bundle that specifies a default list of product options. See Dynamic Bundles.
The minimum number of product options a shopper can select from this component.
The maximum number of product options a shopper can select from this component.
The sort order of the components. The create a bundle
and update a bundle
endpoints do not sort the components. You can use the sort_order
attribute when programming your storefront to display the components in the order that you want.
meta object
The date and time a product is created.
The date and time a product is updated.
Possible values: [organization
, store
]
The resource owner, either organization
or store
.
variations object[]
A product's variations and the options defined for each variation. If you have specified build_rules
, only the child products included in the build_rules
are specified.
A unique ID generated when a variation is created.
The name of a variation.
options object[]
A unique ID that is generated an option is created.
The name of an option.
A description of an option.
child_variations object[]nullable
A child product's variations and the option defined for each variation. This details the variation and options specific to a child product.
A unique ID generated when a variation is created.
The name of a variation.
The sort order value is visible when you add the variations and variation options to your catalogs. You can then use the sort_order
value to program your storefront to display the variation options in the order that you want. The variation with the highest value of sort_order
is displayed first. For example, a variation with a sort_order
value of 3 appears before a variation with a sort_order
value of 2. You can specify any numbers that you want. You can use 1, 2, 3, or 100, 90, 80, including, zero or negative numbers. You can set sort_order
to either null
or omit it entirely from the request if you wish to remove an existing sort_order
attribute.
options object[]nullable
This will be unset for child product variations.
A unique ID that is generated an option is created.
The name of an option.
A description of an option.
option object
The options available for this variation.
A unique ID that is generated an option is created.
The name of an option.
A description of an option.
Possible values: [parent
, child
, bundle
, standard
]
One of the following product types:
The child products defined for a product. The order of the variations in the variation_matrix
is the order of the variations in the array when the variations were linked to the product. For example, the first variation in the variation_matrix
corresponds to the first variation in the array, and so on. You can use the sort_order
attribute to sort the order of your variation and variation options in the variation_matrix
object. See Sorting the Order of Variations and Options If no variations are defined for a product, the variation_matrix
is empty.
relationships object
Relationships are established between different product entities. For example, a bundle
product and a child
product are related to a parent
product, as both are associated with it.
property name* object
data object
A unique identifier for a resource.
This represents the type of resource object being returned.
A unique identifier for a resource.
This represents the type of resource object being returned.
links object
Links are used to allow you to move between requests. Single entities use a self
parameter with a link to that specific resource. Sometimes, there are not enough entities for a project to fill multiple pages. In this situation, we return some defaults.
Property | Description |
---|---|
current | Always the current page. |
first | Always the first page. |
last | null if there is only one page. |
prev | null if the user is on the first page. |
next | null if there is only one page. |
included object
Returns a list of component products in a product bundle. If a bundle has no component products (in other words, is not a product bundle), an empty array is returned.
component_products object[]
Returns a list of component products in a product bundle. If a bundle has no component products (in other words, is not a product bundle), an empty array is returned.
A unique product ID that is generated when you create the product.
Possible values: [product
]
This represents the type of resource object being returned. Always product
.
attributes object
A name for the product.
A description for the product.
A label for the product that is used in the URL paths. A slug can contain A to Z, a to z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. By default, the product name is used as the slug.
The unique stock keeping unit of the product.
Possible values: [live
, draft
]
The status for the product, either draft
or live
.
Possible values: [physical
, digital
]
The commodity type, either physical
or digital
.
The universal product code or european article number of the product.
The manufacturer part number of the product.
The unique attribute associated with the product. This could be an external reference from a separate company system, for example. The maximum length is 2048 characters.
locales object
Product Experience Manager supports localization of products and hierarchies. If your store supports multiple languages, you can localize product names and descriptions. You can have as many locales as you want.
property name* object
A three-letter language code that represents the name of language you have used.
A localized name for the product.
A localized description for the product.
You can use product tags to store or assign a key word against a product. The product tag can then be used to describe or label that product. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on. A product can have up to 20 tags. A product tag can be up to 255 characters. Product tags must not contain any spaces or commas.
extensions object
property name* object
custom_inputs object
You use the custom_inputs
attribute to allow your shoppers to add custom text to a product when adding product items to their carts. This is useful, for example, if you have a product like a T-shirt that can be personalized or you sell greetings cards that can be printed with your shoppers personalized messages. See Personalizing Products.
property name* object
A name for the custom text field. You can rename this to something more representative of the input that shoppers are adding, for example, message
or front
.
A name for the custom text field.
The validation rules for the custom text.
This represents the type of the resource being returned.
The length of the custom input text field.
The number of characters the custom text field can be. You can specify a maximum length up to 255 characters, as the limit is 255 characters.
true
or false
depending on whether the custom text is required.
build_rules object
You can build a combination of child products associated with a product, based on build rules that you specify. This is useful, for example, if you have a variation option that you do not sell. This makes managing and building your child products quick and easy. See Using Build Rules.
Possible values: [include
, exclude
]
Specifies the default behaviour, either include
or exclude
.
An array of option IDs to include when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.
An array of option IDs to exclude when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.
components object
With Product Experience Manager, you can create and manage bundles. A bundle is a purchasable product, comprising of one or more products that you want to sell together. You can create multiple components within a bundle. Each component must have at least one or more options. Each option is a product and a quantity. See Bundles.
property name* object
The name of the component, such as games
. The bundle_configuration
uses the component name to reference a component. A component name should be relatively short and must not contain any special characters.
The component name. The component name is the name that is displayed in your storefront.
options object[]
The product options included in a component. This can be the ID of another bundle.
The unique ID of the product you want to add to a component.
This represents the type of object being returned. Always product
.
The number of this product option that a shopper must purchase.
The sort order of the options. The create a bundle
and update a bundle
endpoints do not sort the options. You can use the sort_order
attribute when programming your storefront to display the options in the order that you want.
Whether the product option is a default option in a bundle. Shoppers can select a bundle that specifies a default list of product options. See Dynamic Bundles.
The minimum number of product options a shopper can select from this component.
The maximum number of product options a shopper can select from this component.
The sort order of the components. The create a bundle
and update a bundle
endpoints do not sort the components. You can use the sort_order
attribute when programming your storefront to display the components in the order that you want.
meta object
The date and time a product is created.
The date and time a product is updated.
Possible values: [organization
, store
]
The resource owner, either organization
or store
.
variations object[]
A product's variations and the options defined for each variation. If you have specified build_rules
, only the child products included in the build_rules
are specified.
A unique ID generated when a variation is created.
The name of a variation.
options object[]
A unique ID that is generated an option is created.
The name of an option.
A description of an option.
child_variations object[]nullable
A child product's variations and the option defined for each variation. This details the variation and options specific to a child product.
A unique ID generated when a variation is created.
The name of a variation.
The sort order value is visible when you add the variations and variation options to your catalogs. You can then use the sort_order
value to program your storefront to display the variation options in the order that you want. The variation with the highest value of sort_order
is displayed first. For example, a variation with a sort_order
value of 3 appears before a variation with a sort_order
value of 2. You can specify any numbers that you want. You can use 1, 2, 3, or 100, 90, 80, including, zero or negative numbers. You can set sort_order
to either null
or omit it entirely from the request if you wish to remove an existing sort_order
attribute.
options object[]nullable
This will be unset for child product variations.
A unique ID that is generated an option is created.
The name of an option.
A description of an option.
option object
The options available for this variation.
A unique ID that is generated an option is created.
The name of an option.
A description of an option.
Possible values: [parent
, child
, bundle
, standard
]
One of the following product types:
The child products defined for a product. The order of the variations in the variation_matrix
is the order of the variations in the array when the variations were linked to the product. For example, the first variation in the variation_matrix
corresponds to the first variation in the array, and so on. You can use the sort_order
attribute to sort the order of your variation and variation options in the variation_matrix
object. See Sorting the Order of Variations and Options If no variations are defined for a product, the variation_matrix
is empty.
relationships object
Relationships are established between different product entities. For example, a bundle
product and a child
product are related to a parent
product, as both are associated with it.
property name* object
data object
A unique identifier for a resource.
This represents the type of resource object being returned.
A unique identifier for a resource.
This represents the type of resource object being returned.
links object
Links are used to allow you to move between requests. Single entities use a self
parameter with a link to that specific resource. Sometimes, there are not enough entities for a project to fill multiple pages. In this situation, we return some defaults.
Property | Description |
---|---|
current | Always the current page. |
first | Always the first page. |
last | null if there is only one page. |
prev | null if the user is on the first page. |
next | null if there is only one page. |
meta object
results object
Contains the results for the entire collection.
Total number of results for the entire collection.
{
"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
- 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"
}
]
}