Patient Documents
Function-calling namespace: patientDocuments
- 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/patient-documents/create
Input Fields
| Field | Type | Required |
|---|---|---|
patientProfileId | string | Yes |
stackUserId | string | Yes |
name | string | Yes |
type | string | Yes |
fileId | string | Yes |
fileUrl | string | No |
fileName | string | Yes |
fileSize | int64 | Yes |
mimeType | string | Yes |
description | string | No |
documentDate | string | No |
hospitalName | string | No |
doctorName | string | No |
isDeleted | *bool | No |
deletedAt | *int64 | No |
createdAt | *int64 | No |
updatedAt | *int64 | 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": "patientDocuments",
"apiName": "create",
"data": {
"patientProfileId": "patientprofile_123",
"stackUserId": "stackuser_123",
"name": "value",
"type": "GENERAL",
"fileId": "file_123",
"fileName": "value",
"fileSize": 1,
"mimeType": "GENERAL"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/patient-documents/delete
Input Fields
| Field | Type | Required |
|---|---|---|
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": "patientDocuments",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/patient-documents/get-by-id
Input Fields
| Field | Type | Required |
|---|---|---|
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": "patientDocuments",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/patient-documents/list-by-organization
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
page | int | No |
pageSize | int | 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": "patientDocuments",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/patient-documents/update
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
patientProfileId | *string | No |
stackUserId | *string | No |
name | *string | No |
type | *string | No |
fileId | *string | No |
fileUrl | *string | No |
fileName | *string | No |
fileSize | *int64 | No |
mimeType | *string | No |
description | *string | No |
documentDate | *string | No |
hospitalName | *string | No |
doctorName | *string | No |
isDeleted | *bool | No |
deletedAt | *int64 | No |
createdAt | *int64 | No |
updatedAt | *int64 | 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": "patientDocuments",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }