Create lab result
Creates a new lab result.
Note: This endpoint requires a user-scoped OAuth token. A pure
client_credentialstoken without user context will be rejected.
Request
POST /api/oauth/v2/resource/lab-results
Header
| Header | Value |
|---|---|
Authorization | Bearer {access_token} |
Content-Type | application/json |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
customerUuid | string | Yes | UUID of the assigned customer |
name | string | No | Name of the lab result |
text | string | No | Description text |
resultText | string | No | Result text |
note | string | No | Internal note |
deviation | string | No | Deviation from the norm value |
unit | string | No | Unit of measurement |
normRange | string | No | Normal range |
warning | boolean | No | Warning active |
date | string | No | Date of the lab result (YYYY-MM-DD, default: today) |
bloodSamplingDate | string | No | Date of blood sampling (YYYY-MM-DD) |
evidenceNumber | string | No | Evidence number |
title | string | No | Title (default: "Labor") |
shortTitle | string | No | Short title (default: "Lab") |
Response
Success (201 Created)
json
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Complete blood count",
"text": "Routine check before surgery",
"resultText": "All values within normal range",
"note": "Patient arrived fasting",
"deviation": null,
"unit": null,
"normRange": null,
"warning": false,
"date": "2026-06-09",
"bloodSamplingDate": "2026-06-09",
"evidenceNumber": "LB-2026-00123",
"title": "Labor",
"shortTitle": "Lab",
"customer": {
"id": "f0e1d2c3-b4a5-6789-fedc-ba9876543210",
"firstName": "Anna",
"lastName": "Muster"
}
}
}Response fields
See Get lab result for the full field description.
Beispiele
bash
curl -X POST "https://my.offisy.at/api/oauth/v2/resource/lab-results" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"customerUuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
"name": "Muster GmbH",
"text": "beispiel",
"resultText": "beispiel",
"note": "beispiel",
"deviation": "beispiel",
"unit": "beispiel",
"normRange": "beispiel",
"warning": "beispiel",
"date": "2026-04-15T10:00:00",
"bloodSamplingDate": "2026-04-15T10:00:00",
"evidenceNumber": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
"title": "beispiel",
"shortTitle": "beispiel"
}'Parameter
Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Invalid request data (e.g. customerUuid missing) |
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope medicals not present |
| 404 | not_found | Customer not found |