EndpointsCategories

Categories

Function-calling namespace: categories

  • Base URL: https://api.aivida.in
  • Engine endpoint: POST /api
  • Auth: Stack token middleware enabled in optional mode.
  • Send token in header: x-stack-access-token: <access_token> (or Authorization: Bearer <access_token>).
  • In optional mode: no token is allowed; invalid token is rejected with 401.

create

Source: backend/endpoints/categories/create

Input Fields

FieldTypeRequiredConstraints
namestringYes-
codestringNo-
imageUrlstringNo-
displayOrderintegerNo-
isActivebooleanNo-

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

FieldTypeRequiredConstraints
categoryIdstringYes-

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

FieldTypeRequiredConstraints
categoryIdstringYes-

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

FieldTypeRequiredConstraints
slugstringYes-

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

FieldTypeRequiredConstraints
categoryIdstringYes-
serviceIdstringNo-

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

FieldTypeRequiredConstraints
pageintegerNo-
pageSizeintegerNo-
limitintegerNo-
offsetintegerNo-
isActivebooleanNonullable
sortBystringNo-
sortOrderstringNo-

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

FieldTypeRequiredConstraints
categoryIdstringYes-
pageintegerNo-
pageSizeintegerNo-
limitintegerNo-
offsetintegerNo-
isActivebooleanNonullable
sortBystringNo-
sortOrderstringNo-

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

FieldTypeRequiredConstraints
pageintegerNo-
pageSizeintegerNo-
searchQuerystringNo-
sortBystringNo-
sortOrderstringNo-

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

FieldTypeRequiredConstraints
categoryIdstringYes-
featuredarray<string>No-
gridarray<string>No-
sectionsarray<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

FieldTypeRequiredConstraints
categoryIdstringYes-
namestringNonullable
codestringNonullable
imageUrlstringNonullable
displayOrderintegerNonullable
isActivebooleanNonullable

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": {} }