Skip to content

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 use application/json. The Content-Type header must be set accordingly (most HTTP clients set this automatically when attaching binary data).

Request

POST /api/oauth/v2/resource/files

HeaderValue
AuthorizationBearer {access_token}
Content-Typemultipart/form-data

Form fields

FieldTypeRequiredDescription
filebinaryYesThe file to upload as binary data
customerUuidstringYesUUID of the assigned customer
titlestringNoTitle of the file (default: "Datei")
shortTitlestringNoShort title of the file (default: "Dat")
datestringNoDate of the file (format: YYYY-MM-DD, default: today)
noticestringNoFree-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

StatusCodeDescription
400validation_errorInvalid request data (e.g. file or customerUuid missing, invalid date format)
401invalid_clientInvalid or missing access token
403insufficient_scopeScope medicals not present
403access_deniedNo create permission
404not_foundCustomer not found or does not belong to this company

Offisy GmbH