Beds
Function-calling namespace: beds
- 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/beds/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
wardId | string | Yes | - |
roomId | string | Yes | - |
bedNumber | string | Yes | - |
displayName | string | Yes | - |
status | string | No | - |
currentAdmissionId | string | No | - |
isActive | boolean | No | 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": "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
| Field | Type | Required | Constraints |
|---|---|---|---|
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": "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
| Field | Type | Required | Constraints |
|---|---|---|---|
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": "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
| Field | Type | Required | Constraints |
|---|---|---|---|
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": "beds",
"apiName": "listActiveWardsForReceptionist",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listAllBedsByRoom
Source: backend/endpoints/beds/list-all-beds-by-room
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
roomId | 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": "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
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
wardId | 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": "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
| Field | Type | Required | Constraints |
|---|---|---|---|
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": "beds",
"apiName": "listAllWards",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listBedTypeServices
Source: backend/endpoints/beds/list-bed-type-services
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
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": "beds",
"apiName": "listBedTypeServices",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/beds/list-by-organization
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
page | integer | No | - |
pageSize | integer | 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": "beds",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/beds/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
organizationId | string | Yes | - |
wardId | string | No | nullable |
roomId | string | No | nullable |
bedNumber | string | No | nullable |
displayName | string | No | nullable |
status | string | No | nullable |
currentAdmissionId | string | No | nullable |
isActive | boolean | No | 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": "beds",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }