List products

View as Markdown
## List products Returns a paginated list of products belonging to the authenticated merchant's store, including linked category, app IDs and modifier IDs. ### Authentication Requires a Merchant API key in `x-api-key`. The key must carry `Merchant.product.read`. ### Query params (`FilterProductDto` extends `PaginationDto`) - `page` (optional, default 1) — page number. - `per_page` (optional, default 10) — page size. - `name` (optional) — case-insensitive `contains` filter on product name. - `productCategoryId` (optional) — UUID; filter by category. - `sort` (optional) — sort spec over allowed fields `createdAt`, `name` (e.g. `sort=createdAt:desc`). ### Response Returns `_metadata` (page, per_page, total_page, total_count) and `records`. Each record includes the product fields plus `apps` (array of linked app IDs) and `modifiers` (array of linked modifier IDs); `productCategoryId` is excluded from each formatted record. --- **Notas:** Records are scoped to the caller's store. Each formatted record flattens apps/modifiers to arrays of IDs and omits productCategoryId (the related productCategory object is still included via the query). Name filter uses Prisma insensitive contains.

Authentication

x-api-keystring
API Key authentication via header

Headers

x-application-account-idstringOptional

Scope the request to a specific store / account instead of the one resolved from the API key. Aliases: the x-account-id header, or the application_account_id / account_id query parameter.

Query parameters

pageintegerOptionalDefaults to 1
Page number to return.
per_pageintegerOptionalDefaults to 10
Number of records per page.
namestringOptional

Case-insensitive partial match on the product name.

productCategoryIdstringOptionalformat: "uuid"
Return only products in this category.
sortstringOptional
Sort by one or more fields, comma-separated. **Allowed fields:** `createdAt`, `name` **Formats:** `field` (ascending by default), `+field`, `-field`, `field:asc`, `field:desc` (`|` also works as the separator).