EndpointsAppointments

Appointments

Function-calling namespace: appointments

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

Input Fields

FieldTypeRequired
organizationIdstringYes
patientIdstringYes
doctorIdstringYes
serviceIdstringNo
scheduledDatestringYes
scheduledTimestringYes
durationintYes
typestringYes
statusstringNo
reasonstringNo
notesstringNo
consultationFee*float64No
paymentStatusstringNo
amountPaid*float64No
paymentMethodstringNo
isPreConsultancyCompleted*boolNo
followUpDatestringNo
followUpStatusstringNo

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

FieldTypeRequired
idstringYes
organizationIdstringYes

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

FieldTypeRequired
idstringYes
organizationIdstringYes

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

FieldTypeRequired
organizationIdstringYes
pageintNo
pageSizeintNo

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

FieldTypeRequired
idstringYes
organizationIdstringYes
serviceId*stringNo
scheduledDate*stringNo
scheduledTime*stringNo
duration*intNo
type*stringNo
status*stringNo
reason*stringNo
notes*stringNo
rescheduleReason*stringNo
cancelledAt*int64No
cancelledReason*stringNo
consultationFee*float64No
paymentStatus*stringNo
amountPaid*float64No
paidAt*int64No
paymentMethod*stringNo
isPreConsultancyCompleted*boolNo
followUpDate*stringNo
followUpStatus*stringNo
followUpNotificationSent*boolNo

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": {} }