EndpointsDoctor Schedules

Doctor Schedules

Function-calling namespace: doctorSchedules

  • 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/doctor-schedules/create

Input Fields

FieldTypeRequiredConstraints
doctorIdstringYes-
organizationIdstringYes-
datestringYesformat: YYYY-MM-DD
slotsarray<object>Yes-

Nested Field Structures

slots item

FieldTypeRequiredConstraints
startTimestringNoformat: HH:mm
endTimestringNoformat: HH:mm
isAvailablebooleanNo-
appointmentIdstringNo-

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": "doctorSchedules",
  "apiName": "create",
  "data": {
    "doctorId": "doctor_123",
    "organizationId": "org_123",
    "date": "2026-03-12",
    "slots": [
      {
        "startTime": "10:30",
        "endTime": "10:30",
        "isAvailable": true,
        "appointmentId": "appointment_123"
      }
    ]
  }
}'

Example Response

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

delete

Source: backend/endpoints/doctor-schedules/delete

Input Fields

FieldTypeRequiredConstraints
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": "doctorSchedules",
  "apiName": "delete",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

getAvailableSlots

Source: backend/endpoints/doctor-schedules/get-available-slots

Input schema type: unknown

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": "doctorSchedules",
  "apiName": "getAvailableSlots",
  "data": {}
}'

Example Response

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

getById

Source: backend/endpoints/doctor-schedules/get-by-id

Input Fields

FieldTypeRequiredConstraints
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": "doctorSchedules",
  "apiName": "getById",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

listByOrganization

Source: backend/endpoints/doctor-schedules/list-by-organization

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
pageintegerNo-
pageSizeintegerNo-

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": "doctorSchedules",
  "apiName": "listByOrganization",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

update

Source: backend/endpoints/doctor-schedules/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
doctorIdstringNonullable
datestringNoformat: YYYY-MM-DD; nullable
slotsarray<object>Nonullable

Nested Field Structures

slots item

FieldTypeRequiredConstraints
startTimestringNoformat: HH:mm
endTimestringNoformat: HH:mm
isAvailablebooleanNo-
appointmentIdstringNo-

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": "doctorSchedules",
  "apiName": "update",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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