Toifalar
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'Xato kodlari: 400 — kiruvchi ma’lumotlar validatsiya xatosi; 401, 403, 429, 500 — barcha metodlar uchun umumiy. Tana formatlari va semantikasi: Javob kodlari va xatolar.
Authorizations
“Authorizations” bo'limiParameters
“Parameters” bo'limiQuery Parameters
“Query Parameters” bo'limipage
integer format: int32
Raqam bo’lmagan -> 400
Example
1limit
integer format: int32
Raqam bo’lmagan -> 400
Example
10search
string
Nomi bo’yicha qidiruv
parent_id
string
Ota buyurtma identifikatori
has_products
boolean
top_level
boolean
is_deleted
boolean
true satri
Example
falseHeader Parameters
“Header Parameters” bo'limiplatform-id
string
Platforma identifikatori. Integratsiyalar uchun statik qiymat ishlatiladi.
Responses
“Responses” bo'limiMuvaffaqiyatli javob
Media typeapplication/json
object
count
Umumiy soni
integer format: int32
categories
Kategoriyalar daraxti
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" } ]}