EndpointsMedical Terms

Medical Terms

Function-calling namespace: medicalTerms

  • 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/medical-terms/create

Input Fields

FieldTypeRequiredConstraints
typestringYes-
namestringYes-
platformDepartmentIdstringNonullable
isPopularbooleanNonullable
isActivebooleanNonullable
createdByUserIdstringNonullable

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": "medicalTerms",
  "apiName": "create",
  "data": {
    "type": "diagnosis",
    "name": "Hypertension",
    "platformDepartmentId": "platform_department_123",
    "isPopular": true
  }
}'

Example Response

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

delete

Source: backend/endpoints/medical-terms/delete

Input Fields

FieldTypeRequiredConstraints
idstringYes-

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": "medicalTerms",
  "apiName": "delete",
  "data": {
    "id": "id_123"
  }
}'

Example Response

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

get

Source: backend/endpoints/medical-terms/get

Input Fields

FieldTypeRequiredConstraints
idstringYes-

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": "medicalTerms",
  "apiName": "get",
  "data": {
    "id": "id_123"
  }
}'

Example Response

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

listActive

Source: backend/endpoints/medical-terms/list-active

Input Fields

FieldTypeRequiredConstraints
searchstringNo-
typestringNo-
createdByUserIdstringNo-
departmentIdstringNo-
platformDepartmentIdstringNo-
sortBystringNo-
sortOrderstringNo-
pageintegerNo-
pageSizeintegerNo-

Filter Notes

  • departmentId filters by medical_terms.platform_department_id.
  • platformDepartmentId is also accepted for the same filter and takes priority when both fields are sent.

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": "medicalTerms",
  "apiName": "listActive",
  "data": {
    "type": "diagnosis",
    "departmentId": "platform_department_123",
    "page": 1,
    "pageSize": 20
  }
}'

Example Response

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

update

Source: backend/endpoints/medical-terms/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
typestringNonullable
namestringNonullable
platformDepartmentIdstringNonullable
isPopularbooleanNonullable
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": "medicalTerms",
  "apiName": "update",
  "data": {
    "id": "term_123",
    "platformDepartmentId": "platform_department_123"
  }
}'

Example Response

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