Subcategories
Function-calling namespace: subcategories
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
create
Source: backend/endpoints/subcategories/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | Yes | - |
code | string | No | - |
imageUrl | string | No | - |
categoryId | string | No | - |
parentId | string | No | - |
displayType | string | No | - |
displayOrder | integer | No | - |
isActive | boolean | No | - |
organizationId | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "subcategories",
"apiName": "create",
"data": {
"name": "value"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/subcategories/delete
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
subcategoryId | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "subcategories",
"apiName": "delete",
"data": {
"subcategoryId": "subcategory_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/subcategories/get-by-id
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
subcategoryId | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "subcategories",
"apiName": "getById",
"data": {
"subcategoryId": "subcategory_123"
}
}'Example Response
{ "status": "ok", "data": {} }list
Source: backend/endpoints/subcategories/list
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
page | integer | No | - |
pageSize | integer | No | - |
limit | integer | No | - |
offset | integer | No | - |
search | string | No | - |
categoryId | string | No | - |
isActive | boolean | No | nullable |
sortBy | string | No | - |
sortOrder | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "subcategories",
"apiName": "list",
"data": {
"page": 1,
"pageSize": 1,
"limit": 1,
"offset": 1,
"search": "value",
"categoryId": "category_123"
}
}'Example Response
{ "status": "ok", "data": {} }listProducts
Source: backend/endpoints/subcategories/list-products
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
subcategoryId | string | Yes | - |
page | integer | No | - |
pageSize | integer | No | - |
limit | integer | No | - |
offset | integer | No | - |
isActive | boolean | No | nullable |
sortBy | string | No | - |
sortOrder | string | No | - |
minPrice | number | No | nullable |
maxPrice | number | No | nullable |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "subcategories",
"apiName": "listProducts",
"data": {
"subcategoryId": "subcategory_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/subcategories/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
subcategoryId | string | Yes | - |
name | string | No | nullable |
code | string | No | nullable |
imageUrl | string | No | nullable |
categoryId | string | No | nullable |
parentId | string | No | nullable |
displayType | string | No | nullable |
displayOrder | integer | No | nullable |
isActive | boolean | No | nullable |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "subcategories",
"apiName": "update",
"data": {
"subcategoryId": "subcategory_123"
}
}'Example Response
{ "status": "ok", "data": {} }