Appointments
Function-calling namespace: appointments
- 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/appointments/create
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
patientId | string | Yes |
doctorId | string | Yes |
serviceId | string | No |
scheduledDate | string | Yes |
scheduledTime | string | Yes |
duration | int | Yes |
type | string | Yes |
status | string | No |
reason | string | No |
notes | string | No |
consultationFee | *float64 | No |
paymentStatus | string | No |
amountPaid | *float64 | No |
paymentMethod | string | No |
isPreConsultancyCompleted | *bool | No |
followUpDate | string | No |
followUpStatus | 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": "appointments",
"apiName": "create",
"data": {
"organizationId": "org_123",
"patientId": "patient_123",
"doctorId": "doctor_123",
"scheduledDate": "2026-03-10",
"scheduledTime": "10:00",
"duration": 1,
"type": "GENERAL"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/appointments/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": "appointments",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/appointments/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": "appointments",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/appointments/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": "appointments",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/appointments/update
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
serviceId | *string | No |
scheduledDate | *string | No |
scheduledTime | *string | No |
duration | *int | No |
type | *string | No |
status | *string | No |
reason | *string | No |
notes | *string | No |
rescheduleReason | *string | No |
cancelledAt | *int64 | No |
cancelledReason | *string | No |
consultationFee | *float64 | No |
paymentStatus | *string | No |
amountPaid | *float64 | No |
paidAt | *int64 | No |
paymentMethod | *string | No |
isPreConsultancyCompleted | *bool | No |
followUpDate | *string | No |
followUpStatus | *string | No |
followUpNotificationSent | *bool | 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": "appointments",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }