Skip to main content

Get a Parent Product's Child Products

GET 

/catalogs/:catalog_id/releases/:release_id/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 shoppers 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.

OperatorDescriptionSupported AttributesExample
EqChecks if the values of two operands are equal. If they are, the condition is true. For product_types, you can only specify one product type. For example, filter=eq(product_types,child).name, sku, slug, manufacturer_part_num, upc_ean, product_types, tagsfilter=eq(name,some-name)
InChecks if the values are included in the specified string. If they are, the condition is true. For product_types, you can specify more than one product type. For example, filter=in(product_types,child,bundle).id, name, sku, slug, manufacturer_part_num, upc_ean, product_types, tagsfilter=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.

ParameterRequiredDescription
component_productsOptionalThe component product data and key attribute data, such as SKU or slug, to return for component products in a product bundle.
main_imageOptionalThe main images associated with a product.
filesOptionalAny files associated with a product.

See Including Resources.

Request

Responses

The list of child products of a specific base product from a catalog.