EndpointsBlood Bank Donors

Blood Bank Donors

Function-calling namespace: bloodBankDonors

  • 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.

countByStackTeamId

Source: backend/endpoints/blood-bank-donors/count-by-stack-team-id

Input Fields

FieldTypeRequiredConstraints
stackTeamIdstringYes-

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": "bloodBankDonors",
  "apiName": "countByStackTeamId",
  "data": {
    "stackTeamId": "org_123"
  }
}'

Example Response

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

create

Source: backend/endpoints/blood-bank-donors/create

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
namestringYes-
genderstringYesoneof: Male
phonestringYes-
bloodGroupstringYes-
ageintegerYesmin: 19
eligibilityStatusstringYesoneof: Eligible
lastDonationDateintegerNonullable
notesstringNo-

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": "bloodBankDonors",
  "apiName": "create",
  "data": {
    "organizationId": "org_123",
    "name": "value",
    "gender": "Male",
    "phone": "+911234567890",
    "bloodGroup": "value",
    "age": 1,
    "eligibilityStatus": "Eligible"
  }
}'

Example Response

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

listByOrganizationSlug

Source: backend/endpoints/blood-bank-donors/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": "bloodBankDonors",
  "apiName": "listByOrganizationSlug",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

update

Source: backend/endpoints/blood-bank-donors/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
namestringYes-
genderstringYesoneof: Male
phonestringYes-
bloodGroupstringYes-
ageintegerYesmin: 1
eligibilityStatusstringYesoneof: Eligible
lastDonationDateintegerNonullable
notesstringNo-

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": "bloodBankDonors",
  "apiName": "update",
  "data": {
    "id": "id_123",
    "name": "value",
    "gender": "Male",
    "phone": "+911234567890",
    "bloodGroup": "value",
    "age": 1,
    "eligibilityStatus": "Eligible"
  }
}'

Example Response

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