Skip to content

List storefront products​

GET
/public/products

Returns a paginated list of published products with an active marketplace listing for the resolved tenant (storefront invariant. Whatever the sort, products a shopper can act on come first and « dead ends » (acceptsOnlineOrders: false and vendorWhatsapp: null) come last, each group in the sort's own order. Supports filtering by category, vendor, brand(s), price range, on-sale, stock status, free-text search and variant attributes. Tenant is resolved from request context, falling back to the default account.

Multi-select: brandId=a,b lists products of brand a OR b; attr[color]=noir,blanc&attr[size]=M lists products carrying (noir OR blanc) AND M — OR inside one attribute, AND across attributes. Attribute keys accept the PIM code or a legacy name (attr[Couleur] = attr[color]). At most 20 values per parameter and 6 attributes; beyond that the request is a 400 (never silently truncated).

Attribute values are matched on their normalised slug — case, accents and separators are folded, so Noir = noir = NOIR and Bleu Marine = bleu-marine. The legacy attributeName + attributeValue pair keeps working (one more single-value attribute; its value is never split on commas). Stored product data is not rewritten.

The filter sidebar for the same query is GET /products/facets.

Products of a vendor with « masquer les produits en rupture » switched on are left out while they have no sellable stock (no instock/onbackorder on the product nor on any live variation) — resolved at read time, before pagination, so total stays right; this covers listings, the home page, related products and the sitemap feed (indexable=true).

Auth: Public (no authentication).

Same route as GET /products under the explicit /public namespace: same handler, parameters, cache headers and X-Channel handling. Prefer this path.

Parameters​

Header Parameters

X-Channel

Distribution channel selecting per-channel storefront display config (independent toggles per marketplace tenant). Display config, not authentication. Absent header defaults to web.

Type
string
Valid values
"web""mobile"
Default
"web"

Query Parameters

page

1-based page (min 1)

Type
integer
Default
1
limit

Page size (1-100)

Type
integer
Default
24
madeInTunisia

1 / true keeps only « made in Tunisia » products (product override ?? vendor default ?? false). 0 / false / absent = no filter (it never selects the non-Tunisian products).

Type
string
Valid values
"1""0""true""false"
stockFirst

1 / true: products in stock first, then the rest, each group in the sort's own order (after the buyable-first rule). Totals unchanged. Absent = unchanged order. Used by storefront brand pages.

Type
string
Valid values
"1""0""true""false"
indexable

Sitemap feed flag. When true, products flagged noindex (via the per-product SEO panel) are excluded so the storefront sitemap only emits indexable URLs. Default (unset) keeps the normal browse behaviour — noindex products still appear on category pages.

Type
boolean
category

Category filter — a master-tree category id or slug (id tried first); lists the whole subtree. categoryId and categorySlug are explicit aliases. An unknown category is a 400 UNKNOWN_CATEGORY (never the whole catalogue); several category parameters naming different categories are a 400 CONFLICTING_CATEGORY_FILTERS. A blank value is ignored.

Type
string
categoryId

Alias of category taking a category id only (mobile app).

Type
string
categorySlug

Alias of category taking a category slug only.

Type
string
vendor_id
Type
string
q

Free-text title match

Type
string
sort
  • newest (default) — most recently created first.
  • price_asc / price_desc — by the card's resolved price (the cheapest variant's selling price for a product with variants), not the raw product column.
  • name — title A→Z.
  • bestselling — units sold over the last 90 days (orders not cancelled / refunded / failed, the vendor source row's sales credited to the storefront copy, a product group's sales shared by its members); ties and unsold products follow, newest first. Ranking recomputed at most every 10 minutes.
  • relevance — with q: exact title > title starts with q > every word of q in the title > title contains q, brand / description matches as a bonus; ties newest first. Without q it is newest.
Type
string
Valid values
"newest""price_asc""price_desc""name""bestselling""relevance"
Default
"newest"
brandId

Brand id, or a comma-separated list of brand ids (OR). At most 20.

Type
string
Example"brd_a,brd_b"
minPrice

Lower bound on the card's resolved price (cheapest variant for a product with variants).

Type
number
maxPrice

Upper bound on the card's resolved price (cheapest variant for a product with variants).

Type
number
onSale

true = only products whose card is on sale — the resolved onSale (for a product with variants, its cheapest variant's promotion, even when the product row carries none).

Type
boolean
stockStatus
Type
string
Valid values
"instock""outofstock""onbackorder"
attributeName

Variant attribute name (PIM code or legacy name); must be paired with attributeValue. Legacy single-value form of attr[...].

Type
string
attributeValue

Variant attribute value, matched case/accent-insensitively on its normalised slug (Noir = noir).

Type
string
attr

Attribute filters, one key per attribute: attr[color]=noir,blanc&attr[size]=M. Comma-separated values are OR'ed, attributes are AND'ed. Values are matched on their normalised slug (case/accent-insensitive). At most 6 attributes, 20 values each. A stored value that itself holds a comma (24/16H/6,5CM) can be sent as its slug (24-16h-6-5cm) or as is: comma pieces that match no value on their own are re-joined when the join is a known value, while pieces that are values stay separate (Blanc,Noir = blanc OR noir). Prefer the slug.

Type
object
Example{ "color": "noir,blanc", "size": "M" }

Responses​

Paginated product list

application/json
JSON
{
  
"ok": true,
  
"data": {
  
  
"items": [
  
  
  
{
  
  
  
  
"id": "string",
  
  
  
  
"slug": "string",
  
  
  
  
"name": "string",
  
  
  
  
"price": 0,
  
  
  
  
"compareAtPrice": 0,
  
  
  
  
"imageUrl": "https://example.com",
  
  
  
  
"vendorId": "string",
  
  
  
  
"vendorName": "string",
  
  
  
  
"inStock": true,
  
  
  
  
"acceptsOnlineOrders": true,
  
  
  
  
"hasVariants": true,
  
  
  
  
"vendorWhatsapp": "string",
  
  
  
  
"createdAt": "2024-01-01T00:00:00Z",
  
  
  
  
"updatedAt": "2024-01-01T00:00:00Z",
  
  
  
  
"brandSlug": "string",
  
  
  
  
"sale": {
  
  
  
  
  
"endsAt": "2024-01-01T00:00:00Z",
  
  
  
  
  
"startedAt": "2024-01-01T00:00:00Z",
  
  
  
  
  
"soldCount": 0,
  
  
  
  
  
"stockAtStart": 0
  
  
  
  
},
  
  
  
  
"madeInTunisia": true,
  
  
  
  
"rating": {
  
  
  
  
  
"value": 0,
  
  
  
  
  
"count": 0
  
  
  
  
},
  
  
  
  
"soldRecently": true,
  
  
  
  
"regularPrice": 0,
  
  
  
  
"salePrice": 0,
  
  
  
  
"onSale": true
  
  
  
}
  
  
],
  
  
"total": 0,
  
  
"page": 0,
  
  
"limit": 0
  
}
}

Playground​

Headers
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Tarifs : contactez-nous — contact@marketkit.ai