Upload medical file
Uploads a new patient file. The file is stored encrypted on the server.
Note: This endpoint uses
multipart/form-data— unlike all other OAuth API endpoints which useapplication/json. TheContent-Typeheader must be set accordingly (most HTTP clients set this automatically when attaching binary data).
Request
POST /api/oauth/v2/resource/files
Header
| Header | Value |
|---|---|
Authorization | Bearer {access_token} |
Content-Type | multipart/form-data |
Form fields
| Field | Type | Required | Description |
|---|---|---|---|
file | binary | Yes | The file to upload as binary data |
customerUuid | string | Yes | UUID of the assigned customer |
title | string | No | Title of the file (default: "Datei") |
shortTitle | string | No | Short title of the file (default: "Dat") |
date | string | No | Date of the file (format: YYYY-MM-DD, default: today) |
notice | string | No | Free-text note for the file (encrypted server-side) |
Example (cURL)
bash
curl -X POST "https://app.offisy.at/api/oauth/v2/resource/files" \
-H "Authorization: Bearer {access_token}" \
-F "file=@/path/to/file.pdf" \
-F "customerUuid=f0e1d2c3-b4a5-6789-fedc-ba9876543210" \
-F "title=MRI Report" \
-F "shortTitle=MRI" \
-F "date=2026-06-10" \
-F "notice=Important report, please review."Response
Success (201 Created)
json
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "MRI Report",
"shortTitle": "MRI",
"date": "2026-06-10",
"filename": "file.pdf",
"notice": "Important report, please review.",
"mimeType": "application/pdf",
"fileSize": 204800,
"download": "https://app.offisy.at/api/oauth/v2/resource/files/a1b2c3d4-e5f6-7890-abcd-ef1234567890/download",
"customer": {
"id": "f0e1d2c3-b4a5-6789-fedc-ba9876543210",
"firstName": "Anna",
"lastName": "Muster"
}
}
}Response fields
See Get medical file for the full field description.
Beispiele
bash
curl -X POST "https://my.offisy.at/api/oauth/v2/resource/files" \
-H "Authorization: Bearer {access_token}" \
-F "file=@beispiel" \
-F "customerUuid=b2c3d4e5-f6a7-8901-bcde-f01234567890" \
-F "title=beispiel" \
-F "shortTitle=beispiel" \
-F "date=2026-04-15T10:00:00" \
-F "notice=beispiel"Parameter
Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Invalid request data (e.g. file or customerUuid missing, invalid date format) |
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope medicals not present |
| 403 | access_denied | No create permission |
| 404 | not_found | Customer not found or does not belong to this company |