Search categories
const url = 'https://acme.mykreezalid.com/api/v1/categories/search?page=1&limit=25&parent_id=4242';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Page number, starting at 1.
Number of results per page (at most 100).
Example
4242Example of a field filter: only the direct sub-categories of this category.
Responses
Section titled “Responses”The matching categories
object
A listing category. Categories can contain sub-categories, to any depth.
object
Category’s unique identifier
Number of listings in the category, sub-categories included
Number of direct sub-categories
Image of the category
Alternative text of the image
Order types available in this category. Present only when the category has some.
object
Unique identifier of the parent category, null for a top-level category
Path of the category page on your marketplace
Sub-categories, each with the same fields as a category (except order_types and parent_id) and its own children.
object
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
Number of results across all pages.
Number of the page returned, starting at 1.
Whether a next page exists.
Whether a previous page exists.
Number of results on this page.
Number of pages.
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