Get a category
const url = 'https://acme.mykreezalid.com/front_api/v1/categories/4242?locale=fr';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/4242?locale=fr'Returns one category with its descriptions and its whole tree of sub-categories. Works without an access token.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
4242Identifier of the category.
Query Parameters
Section titled “Query Parameters”Example
enLanguage of the texts. Categories without a translation in this language keep their original texts.
Responses
Section titled “Responses”The category.
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
{ "category": { "object": "Category", "id": 4242, "title": "Bikes", "slug": "bikes", "url": "/c/bikes", "parent_id": 0, "product_count": 37, "child_count": 3 }}No category has this identifier.