Lab Reports
Function-calling namespace: labReports
- 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/lab-reports/create
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
labOrderId | string | Yes |
reportId | string | Yes |
status | string | Yes |
generatedAt | *int64 | No |
generatedBy | string | No |
verifiedAt | *int64 | No |
verifiedBy | string | No |
deliveredAt | *int64 | No |
deliveryMethod | string | No |
pdfStorageId | string | No |
notes | string | 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": "labReports",
"apiName": "create",
"data": {
"organizationId": "org_123",
"labOrderId": "laborder_123",
"reportId": "report_123",
"status": "ACTIVE"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/lab-reports/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": "labReports",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/lab-reports/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": "labReports",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/lab-reports/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": "labReports",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/lab-reports/update
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
labOrderId | *string | No |
reportId | *string | No |
status | *string | No |
generatedAt | *int64 | No |
generatedBy | *string | No |
verifiedAt | *int64 | No |
verifiedBy | *string | No |
deliveredAt | *int64 | No |
deliveryMethod | *string | No |
pdfStorageId | *string | No |
notes | *string | 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": "labReports",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }