List categories
const url = 'https://acme.mykreezalid.com/front_api/v1/categories?locale=fr&parent_id=0&product_count=1&fields=id%2Ctitle%2Cslug';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://acme.mykreezalid.com/front_api/v1/categories?locale=fr&parent_id=0&product_count=1&fields=id%2Ctitle%2Cslug'Returns the listing categories as a tree: top-level categories, each with its sub-categories nested in children. Filters apply to every category; a category whose parent is filtered out is returned at the top level. The list is not paginated. Works without an access token.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
enLanguage of the texts. Categories without a translation in this language keep their original texts.
Example
0Only categories with this parent. Top-level categories usually have 0 as parent.
Only the categories the marketplace features (true), or only the others (false).
Only categories with exactly this number of sub-categories (0 for the categories without any).
Example
1Only categories with at least this number of listings.
Maximum number of categories read, sub-categories included, in tree order.
Example
id,title,slugComma-separated list of the fields to return for each top-level category, for instance id,title,children. Other fields are left out.
Responses
Section titled “Responses”The category tree.
object
A listing category, with its sub-categories nested in children. Texts are translated into the requested locale when the marketplace provides a translation.
object
A listing category, as the Front API returns it.
Unique identifier of the category.
Path of the category page on the marketplace, relative to its domain. null when the category has no slug.
Identifier of the parent category; 0 or null for a top-level category. Not returned for the entries of children.
Number of listings in the category.
Number of sub-categories.
Image of the category.
Alternative text of the image.
Short description. Only returned by GET /categories/{id}, for the requested category.
Long description. Only returned by GET /categories/{id}, for the requested category.
Search-engine title and description of the category page. Only returned by GET /categories/{id}, for the requested category, when one of them is set.
object
Example
{ "categories": [ { "object": "Category", "id": 4242, "title": "Bikes", "slug": "bikes", "url": "/c/bikes", "parent_id": 0, "product_count": 37, "child_count": 3 } ]}