Categories
GET
/v2/category
const url = 'https://api-admin.billz.ai/v2/category?page=1&limit=10&has_products=false&top_level=false&is_deleted=false';const options = { method: 'GET', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', Authorization: 'Bearer <token>' }};
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://api-admin.billz.ai/v2/category?page=1&limit=10&has_products=false&top_level=false&is_deleted=false' \ --header 'Authorization: Bearer <token>' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01'Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”page
integer format: int32
Non-numeric -> 400
Example
1limit
integer format: int32
Non-numeric -> 400
Example
10search
string
Search by name
parent_id
string
Parent order identifier
has_products
boolean
top_level
boolean
is_deleted
boolean
String true
Example
falseHeader Parameters
Section titled “Header Parameters”platform-id
string
Platform identifier. A static value is used for integrations.
Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
count
Total count
integer format: int32
categories
Category tree
Array<object>
object
id
string
name
string
parent_id
string
all_parent_ids
Array<string>
subRows
Array<object> recursive
product_count
integer format: int32
company_id
string
is_open
boolean
level_number
integer format: int32
from_parent
boolean
deleted_at
integer format: int32
super_parent_id
string
Examplegenerated
{ "count": 1, "categories": [ { "id": "example", "name": "example", "parent_id": "example", "all_parent_ids": [ "example" ], "subRows": [], "product_count": 1, "company_id": "example", "is_open": true, "level_number": 1, "from_parent": true, "deleted_at": 1, "super_parent_id": "example" } ]}