Palbase Commerce & Promotions · API
POST
/commerce/catalog/searchStructured storefront product search with dynamic facets
Execute a structured typo-tolerant product search with nested/multi-value attribute filters, sorting, composite cursor pagination, and dynamic single-CTE facets.
Called by your app, with the publishable key; or a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.
Request body
qstring · optionalTypo-tolerant full-text and trigram query.category_idstring · optionalCategory UUID filter.category_idsstring[] · optionalMultiple category UUIDs.brand_idstring · optionalBrand UUID filter.brand_idsstring[] · optionalMultiple brand UUIDs.store_idstring · optionalStore UUID filter.collection_idstring · optionalCollection UUID filter.channelstring · optionalSales channel key.regionstring · optionalRegion key.currencystring · optionalISO 4217 currency code.kindstring · optionalProduct kind (physical, digital, service, bundle).conditionstring · optionalOffer condition (new, open_box, refurbished, used).min_priceinteger (int64) · optionalMinimum price in minor units.max_priceinteger (int64) · optionalMaximum price in minor units.in_stockboolean · optionalStock availability filter.min_ratingnumber · optionalMinimum star rating (0..5).attributesobject · optionalStructured attribute filter map (scalar exact, array OR-within-key, or nested objects).sortstring · optionalSort mode (relevance, newest, price_asc, price_desc, rating_desc, bestsellers, trending).strategystring · optionalDiscovery strategy identifier.facetsstring[] · optionalRequested facet groups.include_facetsboolean · optionalWhether to compute dynamic facets.limitinteger · optionalMaximum number of items per page (default 50, values >200 are clamped to 200).cursorstring · optionalOpaque sort-aware composite pagination cursor.curl
curl -X POST "https://<your-ref>.palbase.studio/commerce/catalog/search" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"q":"string","category_id":"string","category_ids":["string"],"brand_id":"string","brand_ids":["string"],"store_id":"string","collection_id":"string","channel":"string","region":"string","currency":"string","kind":"string","condition":"string","min_price":0,"max_price":0,"in_stock":false,"min_rating":0,"attributes":{},"sort":"string","strategy":"string","facets":["string"],"include_facets":false,"limit":0,"cursor":"string"}'Responses
200Structured product search results and facets
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation StorefrontSearchProducts of commerce's contract.