Beds

Function-calling namespace: beds

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

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
wardIdstringYes-
roomIdstringYes-
bedNumberstringYes-
displayNamestringYes-
statusstringNo-
currentAdmissionIdstringNo-
isActivebooleanNonullable

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": "beds",
  "apiName": "create",
  "data": {
    "organizationId": "org_123",
    "wardId": "ward_123",
    "roomId": "room_123",
    "bedNumber": "value",
    "displayName": "value"
  }
}'

Example Response

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

delete

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

Example Response

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

getById

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

Example Response

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

listActiveWardsForReceptionist

Source: backend/endpoints/beds/list-active-wards-for-receptionist

Input Fields

FieldTypeRequiredConstraints
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": "beds",
  "apiName": "listActiveWardsForReceptionist",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

listAllBedsByRoom

Source: backend/endpoints/beds/list-all-beds-by-room

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
roomIdstringYes-

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": "beds",
  "apiName": "listAllBedsByRoom",
  "data": {
    "organizationId": "org_123",
    "roomId": "room_123"
  }
}'

Example Response

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

listAllRoomsByWard

Source: backend/endpoints/beds/list-all-rooms-by-ward

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
wardIdstringYes-

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": "beds",
  "apiName": "listAllRoomsByWard",
  "data": {
    "organizationId": "org_123",
    "wardId": "ward_123"
  }
}'

Example Response

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

listAllWards

Source: backend/endpoints/beds/list-all-wards

Input Fields

FieldTypeRequiredConstraints
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": "beds",
  "apiName": "listAllWards",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

listBedTypeServices

Source: backend/endpoints/beds/list-bed-type-services

Input Fields

FieldTypeRequiredConstraints
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": "beds",
  "apiName": "listBedTypeServices",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

listByOrganization

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

Example Response

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

update

Source: backend/endpoints/beds/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
wardIdstringNonullable
roomIdstringNonullable
bedNumberstringNonullable
displayNamestringNonullable
statusstringNonullable
currentAdmissionIdstringNonullable
isActivebooleanNonullable

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

Example Response

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