EndpointsBlood Bank Inventory Units

Blood Bank Inventory Units

Function-calling namespace: bloodBankInventoryUnits

  • 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/blood-bank-inventory-units/create

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
statusstringYes-
bloodGroupstringYes-
donorNamestringNo-
collectionDateintegerYes-
expiryDateintegerYes-
componentTypestringNo-
parentUnitIdstringNo-
donorIdstringNo-
componentsarray<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

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": "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

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": "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

FieldTypeRequiredConstraints
organizationIdstringYes-
unitIdsarray<string>Yesmin: 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

FieldTypeRequiredConstraints
organizationIdstringYes-
unitIdsarray<string>Yesmin: 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

FieldTypeRequiredConstraints
organizationIdstringYes-
searchQuerystringNo-
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": "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

FieldTypeRequiredConstraints
organizationIdstringYes-
bloodGroupstringYes-

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

FieldTypeRequiredConstraints
organizationSlugstringYes-
idstringYes-
componentsarray<string>Yesmin: 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

FieldTypeRequiredConstraints
organizationIdstringYes-
bloodRequestIdstringNo-
bloodGroupstringNo-
unitIdsarray<string>Yesmin: 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

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
unitIdstringNo-
statusstringNo-
bloodGroupstringNo-
donorNamestringNo-
collectionDateintegerNonullable
expiryDateintegerNonullable
componentTypestringNo-
parentUnitIdstringNo-

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

FieldTypeRequiredConstraints
idstringYes-
statusstringYes-

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

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
unitIdstringNo-
statusstringNo-
bloodGroupstringNo-
donorNamestringNo-
collectionDateintegerNonullable
expiryDateintegerNonullable
componentTypestringNo-
parentUnitIdstringNo-

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": {} }