Pre Consultation Forms
Function-calling namespace: preConsultationForms
- 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/pre-consultation-forms/create
Input Fields
| Field | Type | Required |
|---|---|---|
appointmentId | string | Yes |
stackUserId | string | Yes |
departmentName | string | Yes |
answers | map[string]interface{} | Yes |
status | string | Yes |
submittedAt | *int64 | No |
createdAt | *int64 | No |
updatedAt | *int64 | 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": "preConsultationForms",
"apiName": "create",
"data": {
"appointmentId": "appointment_123",
"stackUserId": "stackuser_123",
"departmentName": "value",
"answers": {},
"status": "ACTIVE"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/pre-consultation-forms/delete
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | 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": "preConsultationForms",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/pre-consultation-forms/get-by-id
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | 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": "preConsultationForms",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/pre-consultation-forms/list-by-organization
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
page | int | No |
pageSize | int | 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": "preConsultationForms",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/pre-consultation-forms/update
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
appointmentId | *string | No |
stackUserId | *string | No |
departmentName | *string | No |
answers | *map[string]interface{} | No |
status | *string | No |
submittedAt | *int64 | No |
createdAt | *int64 | No |
updatedAt | *int64 | 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": "preConsultationForms",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }