Download medical file
Downloads the decrypted binary file. The server returns the file directly as a byte stream.
Request
GET /api/oauth/v2/resource/files/{uuid}/download
Header
| Header | Value |
|---|---|
Authorization | Bearer {access_token} |
URL parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | Yes | Unique ID of the file |
Response
Success (200 OK)
The response contains the decrypted file as binary data. The response headers control the download:
| Header | Example value | Description |
|---|---|---|
Content-Type | application/pdf | MIME type of the file |
Content-Disposition | attachment; filename="mri-report.pdf" | Triggers a download; includes the original filename |
Note: This endpoint does not return a JSON body — it returns the raw bytes of the file. Process the response directly as file content.
Example (cURL)
bash
curl -X GET "https://app.offisy.at/api/oauth/v2/resource/files/a1b2c3d4-e5f6-7890-abcd-ef1234567890/download" \
-H "Authorization: Bearer {access_token}" \
--output mri-report.pdfBeispiele
bash
curl -X GET "https://my.offisy.at/api/oauth/v2/resource/files/b2c3d4e5-f6a7-8901-bcde-f01234567890/download" \
-H "Authorization: Bearer {access_token}"Parameter
Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope medicals not present |
| 403 | access_denied | No read permission for this file |
| 404 | not_found | File not found or does not belong to this company |