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

FieldTypeRequired
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

FieldTypeRequired
organizationSlugstringYes
namestringYes
genderstringYes
phonestringYes
bloodGroupstringYes
ageintYes
eligibilityStatusstringYes
lastDonationDate*int64No
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": {
    "organizationSlug": "value",
    "name": "value",
    "gender": "value",
    "phone": "+911234567890",
    "bloodGroup": "value",
    "age": 1,
    "eligibilityStatus": "ACTIVE"
  }
}'

Example Response

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

listByOrganizationSlug

Source: backend/endpoints/blood-bank-donors/list-by-organization-slug

Input Fields

FieldTypeRequired
organizationSlugstringYes

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

Example Response

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

update

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

Input Fields

FieldTypeRequired
idstringYes
namestringYes
genderstringYes
phonestringYes
bloodGroupstringYes
ageintYes
eligibilityStatusstringYes
lastDonationDate*int64No
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": "value",
    "phone": "+911234567890",
    "bloodGroup": "value",
    "age": 1,
    "eligibilityStatus": "ACTIVE"
  }
}'

Example Response

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