Skip to content

Search categories

GET
/categories/search
curl --request GET \
--url 'https://acme.mykreezalid.com/api/v1/categories/search?page=1&limit=25&parent_id=4242' \
--header 'Authorization: Basic <credentials>'

Returns a paginated list of your listing categories, newest first, filtered by the query parameters you send. Every query parameter other than page and limit is an exact-match filter on the category field of the same name, for example ?parent_id=4242 or ?title=Shoes; a name that is not a category field (including sort or fields) makes the request fail. Each result carries id, title, slug, url, image and order_types; the counters, image_alt and parent_id are returned as null and children as an empty list.

page
integer
default: 1 >= 1

Page number, starting at 1.

limit
integer
default: 25 >= 1 <= 100

Number of results per page (at most 100).

parent_id
integer

Example

4242

Example of a field filter: only the direct sub-categories of this category.

The matching categories

Media typeapplication/json
object
categories
Array<object>

A listing category. Categories can contain sub-categories, to any depth.

object
id

Category’s unique identifier

integer
object
string
default: Category
title
string
product_count

Number of listings in the category, sub-categories included

integer
nullable
child_count

Number of direct sub-categories

integer
nullable
image

Image of the category

string
nullable
image_alt

Alternative text of the image

string
nullable
order_types

Order types available in this category. Present only when the category has some.

Array<object>
object
id
integer
title
string
parent_id

Unique identifier of the parent category, null for a top-level category

integer
nullable
slug
string
nullable
url

Path of the category page on your marketplace

string
nullable
children

Sub-categories, each with the same fields as a category (except order_types and parent_id) and its own children.

Array<object>
object
pagination

Paging information, added next to the results of a paginated list. Request another page with the page query parameter and change the page size with limit (at most 100).

object
totalResultsCount

Number of results across all pages.

integer
currentPage

Number of the page returned, starting at 1.

integer
nextPage

Whether a next page exists.

boolean
prevPage

Whether a previous page exists.

boolean
resultOnPageCount

Number of results on this page.

integer
pageCount

Number of pages.

integer

Example

{
"categories": [
{
"id": 432432,
"object": "Category",
"title": "Shoes",
"product_count": 42,
"child_count": 3,
"order_types": [
{
"id": 4242,
"title": "Sale"
}
],
"parent_id": 4242,
"slug": "shoes",
"url": "/c/shoes"
}
],
"pagination": {
"totalResultsCount": 137,
"currentPage": 1,
"resultOnPageCount": 25,
"pageCount": 6
}
}

Missing or wrong API credentials

The requested page does not exist