EndpointsLab Result Files

Lab Result Files

Function-calling namespace: labResultFiles

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

create

Source: backend/endpoints/lab-result-files/create

Input Fields

FieldTypeRequired
organizationIdstringNo
labOrderIdstringYes
testNamestringNo
fileIdstringYes
fileUrlstringNo
fileNamestringYes
fileSizeint64Yes
mimeTypestringYes
descriptionstringNo
uploadedBystringNo
uploadedAt*int64No
createdAt*int64No
isExternalResult*boolNo
uploadedByPatient*boolNo
patientStackUserIdstringNo

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": "labResultFiles",
  "apiName": "create",
  "data": {
    "labOrderId": "laborder_123",
    "fileId": "file_123",
    "fileName": "value",
    "fileSize": 1,
    "mimeType": "GENERAL"
  }
}'

Example Response

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

delete

Source: backend/endpoints/lab-result-files/delete

Input Fields

FieldTypeRequired
idstringYes
organizationIdstringYes

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": "labResultFiles",
  "apiName": "delete",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

getById

Source: backend/endpoints/lab-result-files/get-by-id

Input Fields

FieldTypeRequired
idstringYes
organizationIdstringYes

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": "labResultFiles",
  "apiName": "getById",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

listByOrganization

Source: backend/endpoints/lab-result-files/list-by-organization

Input Fields

FieldTypeRequired
organizationIdstringYes
pageintNo
pageSizeintNo

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": "labResultFiles",
  "apiName": "listByOrganization",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

update

Source: backend/endpoints/lab-result-files/update

Input Fields

FieldTypeRequired
idstringYes
organizationIdstringNo
labOrderId*stringNo
testName*stringNo
fileId*stringNo
fileUrl*stringNo
fileName*stringNo
fileSize*int64No
mimeType*stringNo
description*stringNo
uploadedBy*stringNo
uploadedAt*int64No
createdAt*int64No
isExternalResult*boolNo
uploadedByPatient*boolNo
patientStackUserId*stringNo

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": "labResultFiles",
  "apiName": "update",
  "data": {
    "id": "id_123"
  }
}'

Example Response

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