Blood Bank Inventory Units
Function-calling namespace: bloodBankInventoryUnits
- 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/blood-bank-inventory-units/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
status | string | Yes | - |
bloodGroup | string | Yes | - |
donorName | string | No | - |
collectionDate | integer | Yes | - |
expiryDate | integer | Yes | - |
componentType | string | No | - |
parentUnitId | string | No | - |
donorId | string | No | - |
components | array<string> | 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": "bloodBankInventoryUnits",
"apiName": "create",
"data": {
"organizationId": "org_123",
"status": "scheduled",
"bloodGroup": "value",
"collectionDate": "2026-03-12",
"expiryDate": "2026-03-12"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/blood-bank-inventory-units/delete-unit
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": "bloodBankInventoryUnits",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }deleteUnit
Source: backend/endpoints/blood-bank-inventory-units/delete-unit
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": "bloodBankInventoryUnits",
"apiName": "deleteUnit",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getByIds
Source: backend/endpoints/blood-bank-inventory-units/get-by-ids
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
unitIds | array<string> | Yes | min: 1; dive |
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": "bloodBankInventoryUnits",
"apiName": "getByIds",
"data": {
"organizationId": "org_123",
"unitIds": [
"value"
]
}
}'Example Response
{ "status": "ok", "data": {} }issueReservedUnits
Source: backend/endpoints/blood-bank-inventory-units/issue-reserved-units
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
unitIds | array<string> | Yes | min: 1; dive |
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": "bloodBankInventoryUnits",
"apiName": "issueReservedUnits",
"data": {
"organizationId": "org_123",
"unitIds": [
"value"
]
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganizationSlug
Source: backend/endpoints/blood-bank-inventory-units/list-by-organization-slug
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
searchQuery | string | No | - |
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": "bloodBankInventoryUnits",
"apiName": "listByOrganizationSlug",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganizationSlugAndBloodGroup
Source: backend/endpoints/blood-bank-inventory-units/list-by-organization-slug-and-blood-group
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
bloodGroup | 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": "bloodBankInventoryUnits",
"apiName": "listByOrganizationSlugAndBloodGroup",
"data": {
"organizationId": "org_123",
"bloodGroup": "value"
}
}'Example Response
{ "status": "ok", "data": {} }processWholeBlood
Source: backend/endpoints/blood-bank-inventory-units/process-whole-blood
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationSlug | string | Yes | - |
id | string | Yes | - |
components | array<string> | Yes | min: 1; dive |
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": "bloodBankInventoryUnits",
"apiName": "processWholeBlood",
"data": {
"organizationSlug": "demo-hospital",
"id": "id_123",
"components": [
"value"
]
}
}'Example Response
{ "status": "ok", "data": {} }reserveAvailableUnits
Source: backend/endpoints/blood-bank-inventory-units/reserve-available-units
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
bloodRequestId | string | No | - |
bloodGroup | string | No | - |
unitIds | array<string> | Yes | min: 1; dive |
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": "bloodBankInventoryUnits",
"apiName": "reserveAvailableUnits",
"data": {
"organizationId": "org_123",
"unitIds": [
"value"
]
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/blood-bank-inventory-units/update-unit
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
organizationId | string | Yes | - |
unitId | string | No | - |
status | string | No | - |
bloodGroup | string | No | - |
donorName | string | No | - |
collectionDate | integer | No | nullable |
expiryDate | integer | No | nullable |
componentType | string | No | - |
parentUnitId | string | 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": "bloodBankInventoryUnits",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }updateStatus
Source: backend/endpoints/blood-bank-inventory-units/update-status
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
status | 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": "bloodBankInventoryUnits",
"apiName": "updateStatus",
"data": {
"id": "id_123",
"status": "scheduled"
}
}'Example Response
{ "status": "ok", "data": {} }updateUnit
Source: backend/endpoints/blood-bank-inventory-units/update-unit
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
organizationId | string | Yes | - |
unitId | string | No | - |
status | string | No | - |
bloodGroup | string | No | - |
donorName | string | No | - |
collectionDate | integer | No | nullable |
expiryDate | integer | No | nullable |
componentType | string | No | - |
parentUnitId | string | 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": "bloodBankInventoryUnits",
"apiName": "updateUnit",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }