Create diagnosis
Creates a new diagnosis.
Note: This endpoint requires a user-scoped OAuth token. A pure
client_credentialstoken without user context will be rejected. The treating user is automatically derived from the token and cannot be set manually.
Request
POST /api/oauth/v2/resource/diagnoses
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 |
text | string | Yes | Diagnosis text |
date | string | No | Diagnosis date (YYYY-MM-DD, default: today) |
diagnoseKey | string | No | ICD code of the diagnosis |
side | string | No | Body side (e.g. "left", "right") |
longTerm | boolean | No | Long-term diagnosis |
isExternal | boolean | No | Externally issued |
Response
Success (201 Created)
json
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"text": "Essential hypertension",
"diagnoseKey": "I10",
"date": "2026-06-09",
"side": null,
"longTerm": true,
"isExternal": false,
"customer": {
"id": "f0e1d2c3-b4a5-6789-fedc-ba9876543210",
"firstName": "Anna",
"lastName": "Muster"
},
"treatingUser": {
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"firstName": "Dr. Maria",
"lastName": "Huber"
}
}
}Response fields
See Get diagnosis for the full field description.
Beispiele
bash
curl -X POST "https://my.offisy.at/api/oauth/v2/resource/diagnoses" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"customerUuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
"text": "beispiel",
"date": "2026-04-15T10:00:00",
"diagnoseKey": "beispiel",
"side": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
"longTerm": "Muster",
"isExternal": "beispiel"
}'Parameter
Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Invalid request data (e.g. customerUuid or text missing) |
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope medicals not present |
| 404 | not_found | Customer not found |