Conditions
Function-calling namespace: conditions
- 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/conditions/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | Yes | - |
isGlobal | boolean | No | nullable |
platformDepartmentIds | array<string> | No | - |
symptomIds | array<object> | No | - |
newSymptoms | array<object> | No | - |
Nested Field Structures
symptomIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
symptomId | string | No | - |
weight | number | No | - |
newSymptoms item
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | No | - |
weight | number | 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": "conditions",
"apiName": "create",
"data": {
"name": "value"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/conditions/delete
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | 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": "conditions",
"apiName": "delete",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }get
Source: backend/endpoints/conditions/get
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | 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": "conditions",
"apiName": "get",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }list
Source: backend/endpoints/conditions/list
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
search | string | No | - |
platformDepartmentIds | array<string> | No | - |
cursor | string | No | - |
page | integer | No | - |
pageSize | integer | No | - |
Response Notes
- Supports
search,page, andpageSizerequest fields. - Each returned condition includes
doctorsCount, the number of doctor profiles mapped to that condition. - Doctor counts are read from the normalized doctor-profile-condition mapping table.
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": "conditions",
"apiName": "list",
"data": {
"search": "",
"page": 1,
"pageSize": 20
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/conditions/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
name | string | No | nullable |
isGlobal | boolean | No | nullable |
platformDepartmentIds | array<string> | No | nullable |
symptomIds | array<object> | No | - |
Nested Field Structures
symptomIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
symptomId | string | No | - |
weight | number | 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": "conditions",
"apiName": "update",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }