EndpointsDoctor Availability Overrides

Doctor Availability Overrides

Function-calling namespace: doctorAvailabilityOverrides

  • 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-availability-overrides/create

Input Fields

FieldTypeRequiredConstraints
doctorIdstringYes-
organizationIdstringYes-
datestringYesformat: YYYY-MM-DD
typestringYes-
startTimestringNoformat: HH:mm
endTimestringNoformat: HH:mm

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": "doctorAvailabilityOverrides",
  "apiName": "create",
  "data": {
    "doctorId": "doctor_123",
    "organizationId": "org_123",
    "date": "2026-03-12",
    "type": "general"
  }
}'

Example Response

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

delete

Source: backend/endpoints/doctor-availability-overrides/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": "doctorAvailabilityOverrides",
  "apiName": "delete",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

getById

Source: backend/endpoints/doctor-availability-overrides/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": "doctorAvailabilityOverrides",
  "apiName": "getById",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

listByOrganization

Source: backend/endpoints/doctor-availability-overrides/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": "doctorAvailabilityOverrides",
  "apiName": "listByOrganization",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

update

Source: backend/endpoints/doctor-availability-overrides/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
doctorIdstringNonullable
datestringNoformat: YYYY-MM-DD; nullable
typestringNonullable
startTimestringNoformat: HH:mm; nullable
endTimestringNoformat: HH:mm; nullable

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

Example Response

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