Catalog Browse provides access to one or more products and all data relevant to a product details or list page.
It will ensure that its hierarchy of related entities, like included product, product options, and variants, are properly hydrated and priced so as to minimize the complexity that the caller must handle.
In particular, since SpecificItemChoice and IncludedProduct entities also have an underlying Product
or Variant
, the inherited price will be copied up from those underlying entities onto the SpecificItemChoice
or IncludedProduct
so that the caller does not need to determine them itself.
Tip
|
See the OpenAPI spec for the product details endpoint. |
The request made can contain two headers (along with the typical X-Context-Request
one) as well as several parameters used to determine which product to fetch.
The headers are used to provide additional context for pricing the product and are passed along in pricing calls after retrieving the base catalog info:
X-Price-Context
: Contains general context info including the locale, currency, and user targets associated with the caller’s context
User targets include an identifier and type for a user such as an email and CUSTOMER
for a single user.
X-Price-Info-Context
: Contains additional context info for gathering price info for specific products.
It includes a list of the products converted into PriceableTargets
as well as an optional list of predetermined PriceLists
from which prices should be derived.
Note
|
A
|
The following parameters are passed along to the CatalogProvider and are used to determine which product to retrieve.
productUris
: One or more URIs that map to specific products.
This is used if productIds
are not provided and is the typical way products are identified by a commerce-facing app since the URL that a user has navigated to is available while the specific IDs of the products are not.
productIds
: The specific IDs of the products to retrieve
attributes
: Any unspecified, miscellaneous parameters are added here
The response is one or more of an augmented version of a Product
that includes all the disparate relationships it has consolidated into one object.
It includes:
advancedTags
: All of the product’s related ProductTags.
assets
: All of the product’s assets' metadata including their:
type
: The asset type: IMAGE
, VIDEO
, PDF
, etc.
altText
: Corresponds to the HTML alt
attribute on an <img>
tag.
title
: Corresponds to the HTML title
attribute on an <img>
tag.
contentUrl
: The full URL used to resolve the actual asset content such as a CDN path for an image
embedCode
: HTML to embed on a frontend
tags
: Additional, descriptive or identifying text that can be used to associate an image with a specific Variant
or ProductOption
value, for instance
See ProductAsset javadocs for the full details.
breadcrumbs
: List of navigational breadcrumbs based on the product’s request context or category hierarchy
includedProducts
: Hydrated list of additional, included items (like fixed quantity add-ons) with their own consolidated data
options
: List of ProductOptions with their item or attribute choices hydrated with the appropriate product or variant details and pricing.
Most of the complexity in retrieving products comes from ensuring that these options are as complete as possible for a frontend to display and allow for configuration by a customer without additional backend calls or complex logic to build the hierarchies.
variants
: List of all of a Products
Variants with their pricing hydrated from a pricing provider
parentCategories
: Simplified references to the categories that contain the requested product Includes:
id
: ID of the category
name
: Name or label of the category
url
: URL for displaying details of the category in a commerce-facing app
promotionalProducts
: Lists of the various kinds of promotional products such as cross-sale and up-sale mapped by their type
vendorRef
: If relevant, the ID or reference to a Vendor
.
Tip
|
See the ProductDetails javadoc for further details. |