Categories
Function-calling namespace: categories
- 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/categories/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | Yes | - |
code | string | No | - |
imageUrl | string | No | - |
displayOrder | integer | No | - |
isActive | boolean | 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": "categories",
"apiName": "create",
"data": {
"name": "value"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/categories/delete
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | 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": "categories",
"apiName": "delete",
"data": {
"categoryId": "category_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/categories/get-by-id
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | 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": "categories",
"apiName": "getById",
"data": {
"categoryId": "category_123"
}
}'Example Response
{ "status": "ok", "data": {} }getBySlug
Source: backend/endpoints/categories/get-by-slug
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
slug | 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": "categories",
"apiName": "getBySlug",
"data": {
"slug": "value"
}
}'Example Response
{ "status": "ok", "data": {} }getHome
Source: backend/endpoints/categories/get-home
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | string | Yes | - |
serviceId | 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": "categories",
"apiName": "getHome",
"data": {
"categoryId": "category_123"
}
}'Example Response
{ "status": "ok", "data": {} }list
Source: backend/endpoints/categories/list
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
page | integer | No | - |
pageSize | integer | No | - |
limit | integer | No | - |
offset | integer | 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": "categories",
"apiName": "list",
"data": {
"page": 1,
"pageSize": 1,
"limit": 1,
"offset": 1,
"isActive": true,
"sortBy": "value"
}
}'Example Response
{ "status": "ok", "data": {} }listSubcategories
Source: backend/endpoints/categories/list-subcategories
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | string | Yes | - |
page | integer | No | - |
pageSize | integer | No | - |
limit | integer | No | - |
offset | integer | 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": "categories",
"apiName": "listSubcategories",
"data": {
"categoryId": "category_123"
}
}'Example Response
{ "status": "ok", "data": {} }listWithSubcategories
Source: backend/endpoints/categories/list-with-subcategories
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
page | integer | No | - |
pageSize | integer | No | - |
searchQuery | string | No | - |
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": "categories",
"apiName": "listWithSubcategories",
"data": {
"page": 1,
"pageSize": 1,
"searchQuery": "value",
"sortBy": "value",
"sortOrder": "value"
}
}'Example Response
{ "status": "ok", "data": {} }reorderHome
Source: backend/endpoints/categories/reorder-home
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | string | Yes | - |
featured | array<string> | No | - |
grid | array<string> | No | - |
sections | array<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": "categories",
"apiName": "reorderHome",
"data": {
"categoryId": "category_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/categories/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | string | Yes | - |
name | string | No | nullable |
code | string | No | nullable |
imageUrl | 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": "categories",
"apiName": "update",
"data": {
"categoryId": "category_123"
}
}'Example Response
{ "status": "ok", "data": {} }