EndpointsSubcategories

Subcategories

Function-calling namespace: subcategories

  • 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/subcategories/create

Input Fields

FieldTypeRequiredConstraints
namestringYes-
codestringNo-
imageUrlstringNo-
categoryIdstringNo-
parentIdstringNo-
displayTypestringNo-
displayOrderintegerNo-
isActivebooleanNo-
organizationIdstringNo-

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

FieldTypeRequiredConstraints
subcategoryIdstringYes-

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

FieldTypeRequiredConstraints
subcategoryIdstringYes-

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

FieldTypeRequiredConstraints
pageintegerNo-
pageSizeintegerNo-
limitintegerNo-
offsetintegerNo-
searchstringNo-
categoryIdstringNo-
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": "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

FieldTypeRequiredConstraints
subcategoryIdstringYes-
pageintegerNo-
pageSizeintegerNo-
limitintegerNo-
offsetintegerNo-
isActivebooleanNonullable
sortBystringNo-
sortOrderstringNo-
minPricenumberNonullable
maxPricenumberNonullable

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

FieldTypeRequiredConstraints
subcategoryIdstringYes-
namestringNonullable
codestringNonullable
imageUrlstringNonullable
categoryIdstringNonullable
parentIdstringNonullable
displayTypestringNonullable
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": "subcategories",
  "apiName": "update",
  "data": {
    "subcategoryId": "subcategory_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }