API referenca

Referenca

API Reference

Every endpoint reachable with an API token, grouped by area. This is a reference, not a console — copy the request shape into your own client. See the API & Access Guide for how to generate a token and which scope you need.

Laboratory Integration API

Everything a Laboratory API token can call — scoped to one laboratory and the requests assigned to it. Base path /api/lab-integration.

GET /api/lab-integration/whoami

Identify this laboratory

Confirms which laboratory a token belongs to — useful as a first call when wiring up an integration.

Response

{
    "id": "...",
    "name": "Acme Labs"
}
GET /api/lab-integration/requests

List assigned requests

Paginated list of requests assigned to this laboratory. Always scoped to the token's own laboratory — there is no way to see another laboratory's requests.

ParameterInRequiredDescription
filter[...] query No Optional filters, same shape as the app's own request list.
order[field] query No asc or desc on a sortable column.
page query No Defaults to 1.
pageLimit query No Defaults to 20.

Response

{
    "items": [
        {
            "id": "7d2e6b2a-...",
            "status": "submitted",
            "trackingNumber": "220926-0003",
            "createdAt": "2026-09-20T09:14:00+00:00",
            "labStatus": "in_testing",
            "templateId": "...",
            "templateName": "Dairy — Standard Panel",
            "companyId": "...",
            "companyName": "Acme Foods",
            "createdById": "...",
            "createdByFirstName": "Ana",
            "createdByLastName": "Petrović",
            "laboratoryId": "...",
            "laboratoryName": "Acme Labs",
            "fields": {}
        }
    ],
    "meta": {
        "total": 1,
        "page": 1,
        "perPage": 20,
        "lastPage": 1
    }
}
GET /api/lab-integration/requests/{id}

Get one request

Full detail for one request assigned to this laboratory — field values, samples (each with its own field values, self-describing with name/label/type), examinations, comments and documents. 404 if the request doesn't exist or isn't assigned to this laboratory.

ParameterInRequiredDescription
id path Yes The request's UUID.

Response

{
    "id": "7d2e6b2a-...",
    "status": "submitted",
    "trackingNumber": "220926-0003",
    "createdAt": "2026-09-20T09:14:00+00:00",
    "template": {
        "id": "...",
        "name": "Dairy — Standard Panel"
    },
    "company": {
        "id": "...",
        "name": "Acme Foods"
    },
    "createdBy": {
        "firstName": "Ana",
        "lastName": "Petrović"
    },
    "laboratory": {
        "id": "...",
        "name": "Acme Labs"
    },
    "labStatus": "in_testing",
    "fieldValues": [
        {
            "fieldId": "...",
            "name": "batch_number",
            "label": "Batch number",
            "type": "text",
            "isMultiple": false,
            "displayTemplate": null,
            "value": "B-2201"
        }
    ],
    "examinations": [
        {
            "examinationId": "...",
            "name": "Microbiological panel",
            "appliesToAll": true,
            "sampleIds": []
        }
    ],
    "samples": [
        {
            "id": "...",
            "name": "Gouda cheese, 3 kg block",
            "quantity": 3,
            "unit": "kg",
            "batchNumber": "B-2201",
            "productionDate": "2026-09-18T00:00:00+00:00",
            "expiryDate": "2026-12-18T00:00:00+00:00",
            "packagingType": "vacuum",
            "sampleType": "product",
            "resultStatus": "pending",
            "resultNote": null,
            "createdAt": "2026-09-20T09:14:00+00:00",
            "parentId": null,
            "subjectId": "...",
            "subjectName": "Gouda 48%",
            "subjectTypeId": "...",
            "subjectVersionId": "...",
            "lotId": null,
            "procurementId": null,
            "examinations": [],
            "values": []
        }
    ],
    "comments": [
        {
            "id": "...",
            "body": "Sample arrived slightly warm — noted, testing proceeding.",
            "createdAt": "2026-09-21T11:02:00+00:00",
            "authorId": null,
            "authorFirstName": null,
            "authorLastName": null,
            "laboratoryId": "...",
            "laboratoryName": "Acme Labs"
        }
    ],
    "documents": [
        {
            "id": "...",
            "originalFilename": "result-report.pdf",
            "mimeType": "application/pdf",
            "size": 184320,
            "createdAt": "2026-09-22T08:30:00+00:00",
            "authorId": null,
            "authorFirstName": null,
            "authorLastName": null,
            "laboratoryId": "...",
            "laboratoryName": "Acme Labs"
        }
    ]
}
GET /api/lab-integration/requests/{id}/documents/download/{documentId}

Download a document

Streams the raw file for one document attached to the request. Response is the binary file itself (Content-Type and Content-Disposition set from the stored document), not JSON.

ParameterInRequiredDescription
id path Yes The request's UUID.
documentId path Yes The document's UUID, from the request detail's documents[].

Response

HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="result-report.pdf"

<binary file content>
POST /api/lab-integration/cmd/requests/{id}/status

Update lab status

Moves the request through the laboratory's own progress. Any of the four values can be set at any time — there's no enforced order. Setting done requires every sample to already have a result (not Pending) and locks the request: no further status changes, comments, or documents afterwards.

ParameterInRequiredDescription
id path Yes The request's UUID.
labStatus body Yes One of: accepted, in_testing, requires_documentation, done.

Request

{
    "labStatus": "in_testing"
}

Response

[]
POST /api/lab-integration/cmd/requests/{id}/comments

Post a comment

Adds a comment to the request's conversation, attributed to this laboratory. This is the same thread visible on the request's dossier and the human Laboratory Portal.

ParameterInRequiredDescription
id path Yes The request's UUID.
body body Yes The comment text.

Request

{
    "body": "Sample arrived slightly warm — noted, testing proceeding."
}

Response

{
    "id": "..."
}
POST /api/lab-integration/cmd/requests/{id}/documents

Upload a result document

Attaches a result document to the request. multipart/form-data only, field name file. Only application/pdf is accepted — anything else is rejected before it touches storage.

ParameterInRequiredDescription
id path Yes The request's UUID.
file formData Yes A PDF file.

Request

Content-Type: multipart/form-data; boundary=...

--...
Content-Disposition: form-data; name="file"; filename="result-report.pdf"
Content-Type: application/pdf

<binary file content>
--...--

Response

{
    "id": "..."
}

Internal QC API

Everything a QC API token can call — the same surface the app itself uses, scoped by your account's own role and permissions.

This section is generated directly from the app's route table, so the method and path on every line are always accurate. Full parameter and response documentation is written up above for the Laboratory Integration API first; this list is the map for the rest, filled in with detail over time. Admin marks a platform-admin-only route under /api/admin/....

Catalog

Subjects

GET /api/subject/ List
POST /api/subject/cmd/delete/{id} Delete
POST /api/subject/cmd/documents/delete/{id}/{documentId} Documents delete
POST /api/subject/cmd/documents/upload/{id} Documents upload
POST /api/subject/cmd/history/attachments/delete/{id}/{attachmentId} History attachments delete
POST /api/subject/cmd/history/attachments/upload/{id} History attachments upload
POST /api/subject/cmd/history/delete/{id}/{entryId} History delete
POST /api/subject/cmd/history/{id} History add
POST /api/subject/cmd/register Register
POST /api/subject/cmd/remove-value/{subjectId}/{valueId} Remove value
POST /api/subject/cmd/set-value/{id} Set value
POST /api/subject/cmd/set-values/{id} Set values
POST /api/subject/cmd/update/{id} Update
GET /api/subject/documents/download/{id}/{documentId} Documents download
GET /api/subject/documents/{id} Documents
GET /api/subject/history/attachments/download/{id}/{attachmentId} History attachments download
GET /api/subject/history/{id} History
GET /api/subject/stats Stats
GET /api/subject/{id} Show

Subject Types

GET /api/subject-type/ List
POST /api/subject-type/cmd/add-field/{id} Add field
POST /api/subject-type/cmd/delete/{id} Delete
POST /api/subject-type/cmd/register Register
POST /api/subject-type/cmd/remove-field/{typeId}/{fieldId} Remove field
POST /api/subject-type/cmd/reorder-fields/{id} Reorder fields
POST /api/subject-type/cmd/update-field/{typeId}/{fieldId} Update field
POST /api/subject-type/cmd/update/{id} Update
GET /api/subject-type/stats Stats
GET /api/subject-type/{id} Show

Subject Type Fields

GET /api/subject-type-field/ List

Subject Versions

GET /api/subject-version/ List
POST /api/subject-version/cmd/approve/{id} Approve
POST /api/subject-version/cmd/delete/{id} Delete
POST /api/subject-version/cmd/obsolete/{id} Obsolete
POST /api/subject-version/cmd/register Register
POST /api/subject-version/cmd/update/{id} Update
GET /api/subject-version/{id} Show

Lab Requests

Lab Requests

GET /api/request/ List
POST /api/request/cmd/assign-laboratory/{id} Assign laboratory
POST /api/request/cmd/comments/{id} Comments
POST /api/request/cmd/delete/{id} Delete
POST /api/request/cmd/documents/upload/{id} Documents upload
POST /api/request/cmd/examinations/{id} Examinations
POST /api/request/cmd/from-lots From lots
POST /api/request/cmd/from-subject/{subjectId} From subject
POST /api/request/cmd/lab-status/{id} Lab status
POST /api/request/cmd/reference/{id} Reference
POST /api/request/cmd/register Register
POST /api/request/cmd/samples/results/{id} Samples results
POST /api/request/cmd/submit/{id} Submit
POST /api/request/cmd/update/{id} Update
GET /api/request/documents/download/{id}/{documentId} Documents download
GET /api/request/stats Stats
GET /api/request/{id} Show
GET /api/request/{id}/pdf-preview PDF preview
GET /api/request/{id}/readiness Readiness

Request Templates

GET /api/admin/request-template/ List Admin
POST /api/admin/request-template/cmd/add-field/{id} Add field Admin
POST /api/admin/request-template/cmd/delete/{id} Delete Admin
POST /api/admin/request-template/cmd/duplicate/{sourceId} Duplicate Admin
POST /api/admin/request-template/cmd/register Register Admin
POST /api/admin/request-template/cmd/remove-field/{templateId}/{fieldId} Remove field Admin
POST /api/admin/request-template/cmd/reorder-fields/{id} Reorder fields Admin
POST /api/admin/request-template/cmd/update-field/{templateId}/{fieldId} Update field Admin
POST /api/admin/request-template/cmd/update/{id} Update Admin
GET /api/request-template/ List
POST /api/request-template/cmd/add-field/{id} Add field
POST /api/request-template/cmd/delete/{id} Delete
POST /api/request-template/cmd/duplicate/{sourceId} Duplicate
POST /api/request-template/cmd/register Register
POST /api/request-template/cmd/remove-field/{templateId}/{fieldId} Remove field
POST /api/request-template/cmd/reorder-fields/{id} Reorder fields
POST /api/request-template/cmd/update-field/{templateId}/{fieldId} Update field
POST /api/request-template/cmd/update/{id} Update
GET /api/request-template/resolve/{subjectId}/{subjectTypeId} Resolve
GET /api/request-template/{id} Show

Request Template Fields

GET /api/request-template-field/ List

Samples

GET /api/sample/ List
POST /api/sample/cmd/delete/{id} Delete
POST /api/sample/cmd/examinations/{id} Examinations
POST /api/sample/cmd/register Register
POST /api/sample/cmd/update/{id} Update
GET /api/sample/{id} Show

Examinations

GET /api/examination-definition/ List
POST /api/examination-definition/cmd/delete/{id} Delete
POST /api/examination-definition/cmd/register Register
POST /api/examination-definition/cmd/update/{id} Update
GET /api/examination-definition/stats Stats

Manufacturing & Supply

Production Batches

GET /api/batch/ List
POST /api/batch/cmd/create-qc-request/{id} Create QC request
POST /api/batch/cmd/delete/{id} Delete
POST /api/batch/cmd/register Register
POST /api/batch/cmd/update-product-form/{id} Update product form
POST /api/batch/cmd/update-status/{id} Update status
GET /api/batch/stats Stats
GET /api/batch/{id} Show

Recipes

GET /api/recipe/ List
POST /api/recipe/cmd/delete/{id} Delete
POST /api/recipe/cmd/register Register
POST /api/recipe/cmd/update/{id} Update
GET /api/recipe/stats Stats
GET /api/recipe/{id} Show

Recipe Versions

GET /api/recipe-version/ List
POST /api/recipe-version/cmd/add-line/{id} Add line
POST /api/recipe-version/cmd/approve/{id} Approve
POST /api/recipe-version/cmd/delete/{id} Delete
POST /api/recipe-version/cmd/obsolete/{id} Obsolete
POST /api/recipe-version/cmd/register Register
POST /api/recipe-version/cmd/remove-line/{id}/{lineId} Remove line
POST /api/recipe-version/cmd/update-instructions/{id} Update instructions
POST /api/recipe-version/cmd/update-line/{id}/{lineId} Update line
POST /api/recipe-version/cmd/update/{id} Update
GET /api/recipe-version/{id} Show

Lots

GET /api/lot/ List
POST /api/lot/cmd/delete/{id} Delete
POST /api/lot/cmd/register Register
POST /api/lot/cmd/update-status/{id} Update status
POST /api/lot/cmd/update/{id} Update
GET /api/lot/stats Stats
GET /api/lot/{id} Show

Procurement

GET /api/procurement/ List
POST /api/procurement/cmd/delete/{id} Delete
POST /api/procurement/cmd/receive/{id} Receive
POST /api/procurement/cmd/register Register
POST /api/procurement/cmd/stage-values/{id} Stage values
POST /api/procurement/cmd/update-status/{id} Update status
POST /api/procurement/cmd/update/{id} Update
GET /api/procurement/stages Stages
GET /api/procurement/stats Stats
GET /api/procurement/{id} Show

Packaging Runs

GET /api/packaging-run/ List
POST /api/packaging-run/cmd/create-qc-request-batch List
POST /api/packaging-run/cmd/create-qc-request/{id} List
POST /api/packaging-run/cmd/register List
POST /api/packaging-run/cmd/update-line/{id} List
GET /api/packaging-run/{id} List

Stock

GET /api/stock/movements Movements
GET /api/stock/on-hand On hand

Settings & Administration

Field Definitions

GET /api/field-definition/ List
POST /api/field-definition/cmd/delete/{id} Delete
POST /api/field-definition/cmd/register Register
POST /api/field-definition/cmd/update-width/{id} Update width
POST /api/field-definition/cmd/update/{id} Update
GET /api/field-definition/stats Stats

Company

GET /api/company/ List
POST /api/company/cmd/update Update
POST /api/company/cmd/update-tracking-number-format Update tracking number format

List Configuration

POST /api/list-configuration/cmd/reset/{context} Reset
POST /api/list-configuration/cmd/update Update
GET /api/list-configuration/{context} List

Laboratories

GET /api/laboratory/ List
POST /api/laboratory/cmd/delete/{id} Delete
POST /api/laboratory/cmd/register Register
POST /api/laboratory/cmd/update/{id} Update
POST /api/laboratory/cmd/{id}/api-tokens/extend/{tokenId} API tokens extend
POST /api/laboratory/cmd/{id}/api-tokens/register API tokens register
POST /api/laboratory/cmd/{id}/api-tokens/revoke/{tokenId} API tokens revoke
POST /api/laboratory/cmd/{id}/portal/clear-password Portal clear password
POST /api/laboratory/cmd/{id}/portal/disable Portal disable
POST /api/laboratory/cmd/{id}/portal/enable Portal enable
POST /api/laboratory/cmd/{id}/portal/regenerate-token Portal regenerate token
POST /api/laboratory/cmd/{id}/portal/set-password Portal set password
GET /api/laboratory/stats Stats
GET /api/laboratory/{id} Show
GET /api/laboratory/{id}/api-tokens API tokens

Testing Schedules

GET /api/testing-schedule/ List
POST /api/testing-schedule/cmd/complete/{id} Complete
POST /api/testing-schedule/cmd/delete/{id} Delete
POST /api/testing-schedule/cmd/register Register
POST /api/testing-schedule/cmd/update/{id} Update
GET /api/testing-schedule/{id} Show

PDF Templates

GET /api/admin/pdf-template/ List Admin
POST /api/admin/pdf-template/cmd/delete/{id} Delete Admin
POST /api/admin/pdf-template/cmd/register Register Admin
POST /api/admin/pdf-template/cmd/update/{id} Update Admin
GET /api/admin/pdf-template/{id} Show Admin
GET /api/pdf-template/ List
POST /api/pdf-template/cmd/delete/{id} Delete
POST /api/pdf-template/cmd/register Register
POST /api/pdf-template/cmd/update/{id} Update
GET /api/pdf-template/{id} Show

Team & Users

GET /api/user/ List
GET /api/user/api-tokens API tokens
GET /api/user/avatar/download/{id} Avatar download
POST /api/user/cmd/add-member Add member
POST /api/user/cmd/api-tokens/extend/{id} API tokens extend
POST /api/user/cmd/api-tokens/register API tokens register
POST /api/user/cmd/api-tokens/revoke/{id} API tokens revoke
POST /api/user/cmd/avatar/delete Avatar delete
POST /api/user/cmd/avatar/upload Avatar upload
POST /api/user/cmd/change-password Change password
POST /api/user/cmd/generate-token Generate token
POST /api/user/cmd/register Register
POST /api/user/cmd/update-profile Update profile
GET /api/user/me Me

Other

Icons

GET /api/icons/ List
↑↓ za kretanje za otvaranje esc za zatvaranje