Skip to content

Get a category

GET
/categories/{id}
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.

id
required
integer

Example

4242

Identifier of the category.

locale
string
default: fr

Example

en

Language of the texts. Categories without a translation in this language keep their original texts.

The category.

Media typeapplication/json
object
category

A listing category, with its sub-categories nested in children. Texts are translated into the requested locale when the marketplace provides a translation.

object
object

A listing category, as the Front API returns it.

string
id

Unique identifier of the category.

integer
title
string
nullable
slug
string
nullable
url

Path of the category page on the marketplace, relative to its domain. null when the category has no slug.

string
nullable
parent_id

Identifier of the parent category; 0 or null for a top-level category. Not returned for the entries of children.

integer
nullable
product_count

Number of listings in the category.

integer
nullable
child_count

Number of sub-categories.

integer
nullable
image

Image of the category.

string
nullable
image_alt

Alternative text of the image.

string
nullable
description

Short description. Only returned by GET /categories/{id}, for the requested category.

string
nullable
description_long

Long description. Only returned by GET /categories/{id}, for the requested category.

string
nullable
meta

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
title
string
description
string
children
Array<object> recursive

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.