Skip to main content

Products

The products model represents the structure of product catalog items and their related information in the system. This model enables management of product listings, variants, specifications, and related product relationships. The Product type is referenced by Carts (CartItem) and Orders (OrderItem).

Product Service​

The ProductService provides methods to interact with product data.

getProduct​

Retrieves a specific product by ID.

getProduct(
params: GetProductParams,
authorization?: string
): Observable<Products.Model.Product>

Parameters​

ParameterTypeDescription
paramsGetProductParamsParameters containing product ID, variant ID, and locale
authorizationstringOptional authorization header

Params Parameters​

ParameterTypeDescription
idstringUnique identifier for the product
variantIdstringOptional product variant ID
localestringLocale for localized content

Returns​

An Observable that emits the requested product.

Usage Example​

productService
.getProduct({
id: 'prod-123',
variantId: 'var-456',
locale: 'en-US',
})
.subscribe((product) => {
console.log(`Product: ${product.name}`);
console.log(`SKU: ${product.sku}`);
console.log(`Price: ${product.price.value} ${product.price.currency}`);
console.log(`Type: ${product.type}`);
console.log(`Category: ${product.category}`);
});

getProductList​

Retrieves a paginated list of products with optional filtering.

getProductList(
query: GetProductListQuery,
authorization?: string
): Observable<Products.Model.Products>

Parameters​

ParameterTypeDescription
queryGetProductListQueryQuery parameters for filtering and pagination
authorizationstringOptional authorization header

Query Parameters​

ParameterTypeDescription
offsetnumberNumber of items to skip
limitnumberMaximum number of items to return
typeProductTypeFilter by product type
categorystringFilter by product category
localestringLocale for localized content
sortstringSorting criteria

Returns​

An Observable that emits a paginated list of products.

Usage Example​

productService
.getProductList({
offset: 0,
limit: 10,
type: 'PHYSICAL',
category: 'electronics',
locale: 'en-US',
sort: 'name:asc',
})
.subscribe((products) => {
console.log(`Found ${products.total} products`);
console.log(`Showing ${products.data.length} products`);
products.data.forEach((product) => console.log(product.name));
});

getRelatedProductList​

Retrieves a list of related products based on a reference type (spare parts, replacements, or compatible services).

getRelatedProductList(
params: GetRelatedProductListParams,
authorization?: string
): Observable<Products.Model.Products>

Parameters​

ParameterTypeDescription
paramsGetRelatedProductListParamsParameters for fetching related products
authorizationstringOptional authorization header

Params Parameters​

ParameterTypeDescription
typeProductReferenceTypeType of relationship (required)
productIdstringID of the base product (required)
productVariantIdstringOptional variant ID of the base product
localestringLocale for localized content
limitnumberMaximum number of items to return
offsetnumberNumber of items to skip
sortstringSorting criteria

Returns​

An Observable that emits a paginated list of related products.

Usage Example​

productService
.getRelatedProductList({
type: 'SPARE_PART',
productId: 'prod-123',
productVariantId: 'var-456',
locale: 'en-US',
limit: 5,
})
.subscribe((products) => {
console.log(`Found ${products.total} spare parts`);
products.data.forEach((product) => {
console.log(`${product.name} - ${product.sku}`);
});
});

Data Model Structure​

The products model is designed to support comprehensive product catalog management:

  1. Products can be either physical or virtual items
  2. Products support variants for different configurations
  3. Products can have relationships with other products (spare parts, replacements, compatible services)
  4. Products support rich media with multiple images
  5. Products have flexible specification systems for both quick display and detailed technical information

This structure allows for:

  • Managing product catalogs with different types and categories
  • Supporting product variants and configurations
  • Providing rich product information with images and specifications
  • Establishing relationships between related products
  • Supporting multi-currency pricing
  • Enabling localized product content

The pagination utility allows for efficient retrieval of large product catalogs, supporting standard pagination parameters like offset and limit, as well as filtering by type, category, and other criteria.

Types​

Product​

Represents a product in the catalog.

FieldTypeDescription
idstringUnique identifier
skustringStock keeping unit identifier
namestringProduct name
descriptionstringFull product description
shortDescriptionstringBrief product description (optional)
subtitlestringProduct subtitle or tagline (optional)
variantIdstringVariant identifier if this is a variant (optional)
imageMediaPrimary product image (optional)
imagesMedia[]Additional product images (optional)
pricePriceProduct pricing information
linkstringURL to product detail page
typeProductTypeType of product (physical or virtual)
categorystringProduct category
tagsTag[]Product tags with display variants
keySpecsKeySpecItem[]Key specifications for quick display (optional)
detailedSpecsDetailedSpec[]Detailed specifications (optional)
locationstringProduct location or availability region (optional)

ProductType​

Enumeration of product types.

ValueDescription
PHYSICALPhysical product that requires shipping
VIRTUALDigital or virtual product (e.g., software)

ProductReferenceType​

Enumeration of product relationship types.

ValueDescription
SPARE_PARTReplacement parts for the product
REPLACEMENTAlternative products that can replace this product
COMPATIBLE_SERVICEServices that are compatible with this product

KeySpecItem​

Represents a key specification for quick display.

FieldTypeDescription
valuestringSpecification value (optional)
iconstringIcon identifier for visual display (optional)

DetailedSpec​

Represents a detailed specification with categorization.

FieldTypeDescription
labelstringSpecification label or name
valuestringSpecification value
categorystringCategory grouping for the spec (optional)

Price​

Represents pricing information.

FieldTypeDescription
valuenumberNumeric price value
currencyCurrencyCurrency code
periodstringBilling period for recurring prices (optional)

Currency​

Enumeration of supported currencies.

ValueDescription
USDUnited States Dollar
EUREuro
GBPBritish Pound
PLNPolish Złoty

Media​

Represents media assets (images, videos).

FieldTypeDescription
urlstringURL to the media asset
altstringAlternative text for accessibility
widthnumberMedia width in pixels (optional)
heightnumberMedia height in pixels (optional)
prioritybooleanPriority loading flag (optional)

Tag​

Represents a product tag with styling variant.

FieldTypeDescription
labelstringTag label text
variantstringVisual variant for tag display

Products​

Paginated list of products.

type Products = Pagination.Paginated<Product>;