Health Passports
Function-calling namespace: healthPassports
- 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/health-passports/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
patientId | string | No | - |
patientProfileId | string | No | - |
stackUserId | string | No | - |
status | string | No | - |
recordName | string | No | - |
category | string | No | - |
doctorName | string | No | - |
recordGenerationDate | string | No | format: YYYY-MM-DD |
documents | array<string> | No | - |
documentUrls | array<string> | No | - |
additionalNotes | string | No | - |
medicalRecords | array<object> | No | - |
Nested Field Structures
medicalRecords item
| Field | Type | Required | Constraints |
|---|---|---|---|
recordName | string | No | - |
category | string | No | - |
doctorName | string | No | - |
organizationName | string | No | - |
recordGenerationDate | string | No | format: YYYY-MM-DD |
documents | array<string> | No | - |
additionalNotes | 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": "healthPassports",
"apiName": "create",
"data": {
"patientId": "patient_123",
"status": "scheduled",
"medicalRecords": [
{
"recordName": "value",
"category": "value",
"doctorName": "value",
"organizationName": "value",
"recordGenerationDate": "2026-03-12",
"documents": [
"value"
],
"additionalNotes": "value"
}
]
}
}'Example Response
{ "status": "ok", "data": {} }deleteMedicalRecord
Source: backend/endpoints/health-passports/delete-medical-record
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | 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": "healthPassports",
"apiName": "deleteMedicalRecord",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/health-passports/get-by-id
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | 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": "healthPassports",
"apiName": "getById",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }getByPatientId
Source: backend/endpoints/health-passports/get-by-patient-id
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
patientId | 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": "healthPassports",
"apiName": "getByPatientId",
"data": {
"patientId": "patient_123"
}
}'Example Response
{ "status": "ok", "data": {} }getMine
Source: backend/endpoints/health-passports/get-mine
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
stackUserId | 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": "healthPassports",
"apiName": "getMine",
"data": {
"stackUserId": "stackuser_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/health-passports/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
status | string | No | nullable |
documentUrls | array<string> | No | - |
medicalRecords | array<object> | No | - |
additionalNotes | string | No | nullable |
isDeleted | boolean | No | nullable |
deletedAt | integer | No | unix-ms timestamp; nullable |
Nested Field Structures
medicalRecords item
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | No | - |
passportId | string | No | - |
recordName | string | No | - |
category | string | No | - |
doctorName | string | No | - |
organizationName | string | No | - |
recordGenerationDate | string | No | format: YYYY-MM-DD |
documents | array<string> | No | - |
additionalNotes | string | No | - |
createdAt | integer | No | unix-ms timestamp |
updatedAt | integer | No | unix-ms timestamp |
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": "healthPassports",
"apiName": "update",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }