Categories
Browse the CategoryView tree.
Introduction
REST contract of the product-discovery bounded context of the digital storefront (storefront model, contexts[product-discovery].rest). Discovery is the read side of browsing and search (no aggregate in v1): ProductView per catalogue item (title, flags, content, category path, list and effective price, inStock, purchasable) and CategoryView (tree plus purchasable counts), fed by events from offer-availability, product-content and pricing. Search ranks title (A), category names (A), attributes (B) and description (C) in a PostgreSQL tsvector with a GIN index, with pg_trgm similarity as the typo fallback; facets are category, price band and in-stock; product-type queries also return category suggestions. Errors are RFC 9457 problem details (application/problem+json); this read-only surface uses not-found (404) and validation-failed (422), plus 400 problems for paging (invalid-limit, invalid-cursor, unknown-query-parameter). No authentication. A catalogue item the item master has not announced yet (a stub row) is invisible: GET /products/{id} answers 404 for it and search never lists it. The category path of a product is joined from the CategoryView at query time, so a category rename shows at once without re-indexing products.
Categories
Categories
Get one product view
GetProduct, the full ProductView of one catalogue item for the product page (SSR renders this in one call; delivery dates are loaded asynchronously afterwards by the BFF).
Get the category tree with purchasable counts
ListCategories, the CategoryView: tree plus purchasable counts per category.
Products
Products
Search and filter purchasable products
SearchProducts over the ProductView projection. q runs full-text search (tsvector weights title A, category names A, attributes B, description C) with a pg_trgm similarity fallback for typos; filters combine with AND. Product-type queries also return category suggestions. Keyset pagination: limit (1-500, default 100) and the opaque cursor taken from the previous page's nextCursor; filters are repeated on every page. A query parameter the operation does not declare (for example the retired after) is a 400 unknown-query-parameter.