EndpointsLab Results

Lab Results

Function-calling namespace: labResults

  • 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-results/create

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
labOrderIdstringYes-
testNamestringYes-
resultstringYes-
unitstringNo-
referenceRangestringNo-
isAbnormalbooleanNo-
notesstringNo-
performedBystringNo-
verifiedBystringNo-
verifiedAtintegerNounix-ms timestamp; nullable
statusstringNo-
createdAtintegerNounix-ms timestamp; nullable

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": "labResults",
  "apiName": "create",
  "data": {
    "organizationId": "org_123",
    "labOrderId": "laborder_123",
    "testName": "value",
    "result": "value"
  }
}'

Example Response

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

delete

Source: backend/endpoints/lab-results/delete

Input Fields

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

Example Response

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

getById

Source: backend/endpoints/lab-results/get-by-id

Input Fields

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

Example Response

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

listByOrganization

Source: backend/endpoints/lab-results/list-by-organization

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
pageintegerNo-
pageSizeintegerNo-

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

Example Response

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

update

Source: backend/endpoints/lab-results/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
labOrderIdstringNonullable
testNamestringNonullable
resultstringNonullable
unitstringNonullable
referenceRangestringNonullable
isAbnormalbooleanNonullable
notesstringNonullable
performedBystringNonullable
verifiedBystringNonullable
verifiedAtintegerNounix-ms timestamp; nullable
statusstringNonullable
createdAtintegerNounix-ms timestamp; nullable

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

Example Response

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