Product Projections

Product projection is a projected representation of a product that shows the product with its current or staged data.

At any time, a Product has either one or two projected representations, depending on whether the product is currently published. Only published products have a current projected representation. Newly created products only have a staged projected representation.
In general, a shop (storefront) will get the product data by querying or searching the current product projections.
The query endpoint provides the query predicates. The search endpoint provides full-text search, filtering and faceting functionality, offers better response times and should therefore be the preferred option.

Representations

ProductProjection

Get ProductProjection

Get ProductProjection by ID

Gets the current or staged representation of a product in a catalog by ID.

Endpoint: /{projectKey}/product-projections/{id}
Method: GET
OAuth2 Scopes: view_products:{projectKey}
Response Representation: ProductProjection
Query Parameters:

Get ProductProjection by Key

Gets the current or staged representation of a product found by Key.

Endpoint: /{projectKey}/product-projections/key={key}
Method: GET
OAuth2 Scopes: view_products:{projectKey}
Response Representation: ProductProjection
Query Parameters:

Query ProductProjections

You can use the product projections query endpoint to get the current or staged representations of Products. REMARK: We suggest to use the performance optimized search endpoint which has a bunch functionalities, the query API lacks, like sorting on custom attributes, etc.

Endpoint: /{projectKey}/product-projections
Method: GET
OAuth2 Scopes: view_products:{projectKey}
Response Representation: PagedQueryResult with the results array of ProductProjection
Query Parameters:

Example:
GET /{projectKey}/product-projections?staged=true&limit=10

comments powered by Disqus