Get a Parent Product's Child Products
GET/catalog/products/:product_id/relationships/children
For a specified product and catalog release, retrieves a list of child products from a parent product. Any product other than a base product results in a 422 Unprocessable Entity
response. Only the products in a live
status are retrieved.
If you have multiple catalog rules defined, the rule that best matches the shopperʼs context is used to determine which catalog is retrieved. If no catalog rules are configured, the first catalog found is returned. For information about how rules are matched, see Resolving Catalog Rules.
You can see the parent nodes a product is associated within the breadcrumbs
metadata for each product. For example, this is useful if you want to improve how your shoppers search your store. See Product and Node Associations in Breadcrumb Metadata.
Filtering
This endpoint supports filtering. For general filtering syntax, see Filtering. The following operators and attributes are available when filtering on this endpoint.
Operator | Description | Supported Attributes | Example |
---|---|---|---|
Eq | Checks if the values of two operands are equal. If they are, the condition is true. For product_types and tags , you can only specify one. For example, filter=eq(product_types,child) . | name , sku , slug , manufacturer_part_num , upc_ean , product_types , tags | filter=eq(name,some-name) |
In | Checks if the values are included in the specified string. If they are, the condition is true. For product_types and tags , you can specify more than one. For example, filter=in(product_types,child,bundle) . | id , name , sku , slug , manufacturer_part_num , upc_ean , product_types , tags | filter=in(id,some-id) |
Building breadcrumbs in a storefront
In a catalog, you can use a filter to return a list of nodes in a hierarchy structure that a product belongs to. You can use this to build breadcrumbs in your storefront. An example is shown below.
filter=in(id,c83bfe55-0d87-4302-a86d-ab19e7e323f1,6003d7ef-84f3-49bb-a8bd-4cbfa203dcbb)
- Specify the node Ids in the filter expression.
- You can have as many node Ids as you want.
- It does not matter what order you specify the node Ids. The nodes are returned in the order they were last updated.
Including Resources
Using the include
parameter, you can retrieve top-level resources, such as, files or main image, bundle component products and product attributes, such as SKU or slug.
Parameter | Required | Description |
---|---|---|
component_products | Optional | The component product data and key attribute data, such as SKU or slug, to return for component products in a product bundle. |
main_image | Optional | The main images associated with a product. |
files | Optional | Any files associated with a product. |
See Including Resources.
Request
Path Parameters
The product ID.
Query Parameters
This endpoints support filtering. See Filtering.
Possible values: >= 1
The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the page length store setting is used.
Possible values: <= 10000
The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the page length store setting is used.
Header Parameters
The list of channels in which this catalog can be displayed. A channel is the shopping experience, such as a mobile app or web storefront. If empty, the catalog rule matches all channels. The channel will eventually be included in the bearer token that is used for authorization, but currently, you must set the EP-Channel
header in your requests.
Product tags are used 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. You can enhance your product list using tags, enabling you to refine your product list and run targeted promotions. Tags are used to refine the eligibility criteria for a rule. Requests populate the catalog rule tag using the EP-Context-Tag
header.
The language and locale your storefront prefers. See Accept-Language.
Responses
- 200
- default
The list of child products of a parent product from a catalog.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- You can rename input to something more representative of the input that shoppers are adding, for example,
message
orfront
. name
is the name that is displayed in your storefront.- You can add validation rules. For example, the input field must be a string and/or up to 255 characters in length. The limit is 255 characters.
- Array [
- ]
- Array [
- ]
- Array [
- ]
- Array [
- ]
- Array [
- ]
- The
price_increment
type increases the prices of a product. - The
price_decrement
type decreases the price of a product. - The
price_equals
type sets the price of a product to an amount you specify. - Array [
- Array [
- ]
- ]
- Array [
- Array [
- ]
- ]
- standard - Standard products are a standalone products.
- parent - A parent product is a product that has child products that have been built using the
Build Child Products
endpoint. - child - When you configure product variations and variation options for parent products, the child products derived from the parent products are automatically created in Commerce.
- bundle - A bundle is a purchasable product, comprising two or more standalone products (in other words, components) to be sold together.
- ]
meta object
Contains the results for the entire collection.
results object
Total number of results for the entire collection.
Total number of results for the entire collection.
page object
The maximum number of records for all pages.
The current offset by number of pages.
The current number of pages.
The total number of records for the entire collection.
data object[]
attributes object
A product's attributes.
The date and time a product was published in a catalog.
If this product is a parent
product. A parent
product is a product that has child products that have been built using the build child products
endpoint.
The unique identifier of a parent
product.
The commodity type, either physical
or digital
.
If a product is curated, then the curated_product
attribute with a value of true
is displayed. If a product is not curated, the curated_product
attribute is not displayed.
The universal product code or european article number of the product.
The manufacturer part number of the product.
A list of tags associated with the product. A tag must be HTML compatible characters excluding commas and will be stored in lowercase letters.
A list of price modifier names.
The date and time a product was created.
A description of the product.
A name of a product.
price object
A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.
property name* Amount
The three-letter ISO code for the currency associated with this price.
The price in the lowest denomination for the specified currency. This is a product's list price.
Whether this price includes tax.
shopper_attributes object
The optional price extension with values in string format, viewable by shoppers.
tiers object
The price tier that an item is eligible for based on the quantity purchased. You cannot have conflicting tiers within the same currencies block.
property name* Tier
The name of the tier, for example, Pencils
.
The minimum quantity of 1 or more defined for the specified price. If a minimum quantity is not specified, an error is returned.
price object
A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.
property name* Amount
The three-letter ISO code for the currency associated with this price.
The price in the lowest denomination for the specified currency. This is a product's list price.
Whether this price includes tax.
components object
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.
property name* Component Product
The unique identifier of the component, for example, games
.
The component name is the name that is displayed in your storefront.
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.
options object[]
The product options included in a component. This can be the ID of another bundle.
A unique identifier of the product you want to add to a component.
Possible values: [product
]
Default value: product
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.
The boolean indicates whether the current option is a default option for the component.
custom_inputs object
You can 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. You can do this using the custom_inputs
attribute.
property name* Custom Input
The name of the custom input. You can rename the input to something more representative of the input that shoppers are adding, for example, message
or front
.
The name for the custom text field that is displayed in your storefront.
validation_rules object[]
The validation rules for the custom text.
Possible values: [string
]
Default value: string
This represents the type of object being returned. Must be string
.
options object
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.
This is true
or false
depending on whether the custom text is required.
The unique stock keeping unit of 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 status of the product, either live
or draft
.
The unique attribute associated with the product. This could be an external reference from a separate company system, for example.
The date and time a product was updated.
extensions object
With extension templates, you can attach a specific set of custom fields to your products in Product Experience Manager. For example, a Book template might contain the attributes, such as ISBN, Author, Number of pages, Year Published, or Condition (New/Used).
property name* Extension
The name of the product template.
The product attributes available for this template.
A unique identifier for a product.
relationships object
Relationships allow you to move between requests. Includes links to the parent and child products, bundle component products, files, and main images associated with a product.
parent object
The details of a parent
product. A parent
product is a product that has child products that have been built using the Build Child Products
endpoint.
data object
A product identifier.
A unique identifier for a product.
Possible values: [product
]
This represents the type of object being returned. Always product
.
children object
The details of a child
product. When you configure product variations and variation options for parent products, the child products derived from the parent products are automatically created in Commerce.
data object[]
A list of product identifiers.
A unique identifier for a product.
Possible values: [product
]
This represents the type of object being returned. Always product
.
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.
files object
In Product Experience Manager, products can have associated rich media assets, such as product images or a file containing additional product details.
data object[]
Possible values: [file
]
This represents the type of object being returned. Always file
.
A unique identifier for a file.
The date and time a file is created.
main_image object
In Product Experience Manager, products can also have associated product images.
data object
The images associated with a product.
Possible values: [main_image
]
This represents the type of object being returned. Always main_image
.
A unique identifier for an image.
component_products object
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. You can link to the products that make up your bundle components.
data object[]
A list of product identifiers.
A unique identifier for a product.
Possible values: [product
]
This represents the type of object being returned. Always product
.
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.
This represents the type of object being returned. Always product
.
meta object
A product's metadata contains information about products, for example, the nodes a product is associated with, any child products, bundle configurations, and so on.
bread_crumbs object
The relationship among the array of nodes a product is associated with, demonstrating the linking of the children nodes with the parent nodes. Up to 10 levels of parent nodes are displayed, depending on the number of levels of parent nodes you have.
property name* string[]
string
An array of parent node IDs that a product is associated with. Up to 10 levels of parent nodes are displayed, depending on the number of levels of parent nodes you have.
A unique identifier of the catalog a product is associated with.
The unique identifier of the price book a product is associated with.
display_price object
A price formatted for display.
with_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
without_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
Possible values: [pim
]
The source of a catalog. Always pim
.
With sales pricing, a store can optionally add a sale price to a product price. For example, a store can schedule seasonal pricing on products without creating a new price book and catalog ruleset. Optionally, a store can schedule the date ranges for the sale products. This is the unique identifier of a sale.
The date and time a sale expires.
original_price object
A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.
property name* Amount
The three-letter ISO code for the currency associated with this price.
The price in the lowest denomination for the specified currency. This is a product's list price.
Whether this price includes tax.
original_display_price object
A price formatted for display.
with_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
without_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
bundle_configuration object
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.
selected_options objectrequired
The product options included in a component. This can be the ID of another bundle.
property name* object
The unique identifier of the component, for example, games
.
The number of this product option that a shopper must purchase.
component_products object
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.
property name* object
With sales pricing, a store can optionally add a sale price to a product price. For example, a store can schedule seasonal pricing on products without creating a new price book and catalog ruleset. Optionally, a store can schedule the date ranges for the sale products. This is the unique identifier of a sale.
The date and time a sale expires.
price object
A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.
property name* Amount
The three-letter ISO code for the currency associated with this price.
The price in the lowest denomination for the specified currency. This is a product's list price.
Whether this price includes tax.
display_price object
A price formatted for display.
with_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
without_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
original_price object
A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.
property name* Amount
The three-letter ISO code for the currency associated with this price.
The price in the lowest denomination for the specified currency. This is a product's list price.
Whether this price includes tax.
original_display_price object
A price formatted for display.
with_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
without_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
price_modifiers object
You can use price modifiers to change the price property of child products. By default, child products inherit the same price as their base products. Using price modifiers, you can enable child products to inherit a different price.
property name* object
A name for the modifier. The name must be unique and is case-sensitive.
There are three modifier types.
currencies object
A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.
property name* Amount
The three-letter ISO code for the currency associated with this price.
The price in the lowest denomination for the specified currency. This is a product's list price.
Whether this price includes tax.
tiers object
You can use tiers to allow your store to offer different pricing for minimum quantities of items that your shoppers purchase.
property name* object
The name of the tier, such as Pencils
.
The unique identifier of a sale.
The date and time a sale expires.
display_price object
A price formatted for display.
with_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
without_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
original_price object
A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.
property name* Amount
The three-letter ISO code for the currency associated with this price.
The price in the lowest denomination for the specified currency. This is a product's list price.
Whether this price includes tax.
original_display_price object
A price formatted for display.
with_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
without_tax object
A price formatted for display.
The price in the lowest denomination for the specified currency. This is a product's list price.
The three-letter ISO code of the currencies associated with this price and the amount.
The format of the price for display.
The variation_matrix
object lists the variation IDs and variation option IDs and their corresponding product IDs that are generated when the variation and variation options are built with a product. If no variations are available, the variation_matrix
is empty.
variations object[]
If you specified build_rules
for a product, the variations
object lists the variation option IDs that you specified to include when building your child products. If no build_rules
are specified, all the variation and variation options available for a product are displayed. If a product does not have any variations, then the variations
object is not displayed.
A unique identifier of a variation.
The name of a variation.
If you specified a sort_order
when creating your variations and variation options, then use the sort_order
value to program your storefront to display the variations and variation options in the order that you want.
option object
The options available for a variation.
A unique identifier for an option.
The name of the option.
If you specified a sort_order
when creating your variations and variation options, then use the sort_order
value to program your storefront to display the variations and variation options in the order that you want.
The option description to display to customers.
options object[]
The options available for this variation.
A unique identifier for an option.
The name of the option.
If you specified a sort_order
when creating your variations and variation options, then use the sort_order
value to program your storefront to display the variations and variation options in the order that you want.
The option description to display to customers.
An array of variation options IDs that a child product has.
child_variations object[]nullable
If this is a child product, the child_variations
object lists the variation option IDs that define this child product.
A unique identifier of a variation.
The name of a variation.
If you specified a sort_order
when creating your variations and variation options, then use the sort_order
value to program your storefront to display the variations and variation options in the order that you want.
option object
The options available for a variation.
A unique identifier for an option.
The name of the option.
If you specified a sort_order
when creating your variations and variation options, then use the sort_order
value to program your storefront to display the variations and variation options in the order that you want.
The option description to display to customers.
options object[]
The options available for this variation.
A unique identifier for an option.
The name of the option.
If you specified a sort_order
when creating your variations and variation options, then use the sort_order
value to program your storefront to display the variations and variation options in the order that you want.
The option description to display to customers.
Commerce automatically assigns types to the products you create. In Commerce Manager, you can see at a glance the product types in a list of a products. In addition, you can filter on product types in both the API and Commerce Manager.
Product types can also be used in catalogs. For example, in your catalog, you can filter on parent so that only your parent products are displayed in your storefront.
Products have one of the following types:
If you storefront supports multiple languages, your storefront's preferred language and locale.
links object
Links allow you to move between requests.
Single entities use a self
parameter with a link the specific resource.
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 there is only one page.
{
"meta": {
"results": {
"total": 0
},
"page": {
"limit": 0,
"offset": 0,
"current": 0,
"total": 0
}
},
"data": [
{
"attributes": {
"published_at": "1970-01-01T00:00:00.000",
"base_product": false,
"base_product_id": "cdf574bc-e36e-48fc-9eac-01c87839b285",
"commodity_type": "physical",
"curated_product": true,
"upc_ean": "0123456",
"manufacturer_part_num": "mfn1",
"tags": [
"tag-a"
],
"price_modifiers": [
"modifier-1"
],
"created_at": "1970-01-01T00:00:00.000",
"description": "This is a product",
"name": "Blue shirt",
"price": {},
"shopper_attributes": {},
"tiers": {},
"components": {},
"custom_inputs": {},
"sku": "blue-shirt",
"slug": "blue-shirt",
"status": "live",
"external_ref": "string",
"updated_at": "1970-01-01T00:00:00.000",
"extensions": {}
},
"id": "8fccaa19-dba9-4621-8d11-31a222a68c7c",
"relationships": {
"parent": {
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
},
"children": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {
"self": "string"
}
},
"files": {
"data": [
{
"type": "file",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "1970-01-01T00:00:00.000"
}
]
},
"main_image": {
"data": {
"type": "main_image",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
"component_products": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {
"self": "string"
}
}
},
"type": "product",
"meta": {
"bread_crumbs": {},
"bread_crumb_nodes": [
"8dbb35b2-ef04-477e-974d-e5f3abe6faae"
],
"catalog_id": "362a16dc-f7c6-4280-83d6-4fcc152af091",
"pricebook_id": "f5466169-0037-460c-b181-b02682b6f4de",
"display_price": {
"with_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
},
"without_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
}
},
"catalog_source": "pim",
"sale_id": "string",
"sale_expires": "1970-01-01T00:00:00.000",
"original_price": {},
"original_display_price": {
"with_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
},
"without_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
}
},
"bundle_configuration": {
"selected_options": {}
},
"component_products": {},
"price_modifiers": {},
"tiers": {},
"variation_matrix": {},
"variations": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"option": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
},
"options": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
}
]
}
],
"child_option_ids": [
[
"8dbb35b2-ef04-477e-974d-e5f3abe6faae",
"6ddf2a66-d805-449c-a0e1-8e81335e31a6"
]
],
"child_variations": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"option": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
},
"options": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
}
]
}
],
"product_types": [
"string"
],
"language": "en-GB"
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
The unexpected error.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
{
"errors": [
{
"detail": "not processable",
"status": "422",
"title": "There was a problem processing your request."
}
]
}