ConnectCloud Developers

Attach a receipt to a draft or rejected report of the caller

POST /api/hr/v1/travel-reports/{id}/receipts

Module: HR · operationId: uploadTravelReceipt · Tag: Travel expenses · Auth: access token (Authorization: Bearer <accessToken>)

A photo (JPEG, PNG, WebP, HEIC) or PDF of at most 15 MB as multipart field file. The file is stored in the DMS, which scans it for malware: until the scan is CLEAN it is neither served nor read; an INFECTED receipt is refused (422 infected). When the DMS cannot take the file while a scan has not finished, nothing is stored and the answer is 503 scan_pending with Retry-After (seconds): send the same upload again after it.

Parameters

Name In Type Required Description
id path string (uuid) yes

Request body

multipart/form-data (required)

  • file (string (binary), required): The receipt (photo or PDF)

Responses

  • 201 Stored (application/json)
  • 400 Error (application/json)
  • 404 Error (application/json)
  • 409 Error (application/json)
  • 413 Error (application/json)
  • 422 Error (application/json)
  • 503 The DMS is unavailable, or cannot take the file while a malware scan runs (scan_pending) – retry (application/json)

Fields of the 201 answer:

  • contentType (string): Media type of the file
  • createdAt (string (date-time)): When the receipt was uploaded
  • createdBy (string): Who uploaded the receipt (e-mail)
  • documentId (string): DMS document (owner module hr)
  • fileName (string): File name
  • id (string): Id of the receipt
  • scanStatus (string): Malware scan of the DMS (one of PENDING, CLEAN, INFECTED, SKIPPED, FAILED)
  • sizeBytes (integer): Size in bytes

Example 201 answer:

{
  "contentType": "application/pdf",
  "createdAt": "2026-11-06T07:48:00Z",
  "createdBy": "jonas.bauer@muster-it.example",
  "documentId": "8b0d2f4b-6d8f-4b0d-9f4b-6d8f0b2d4f45",
  "fileName": "rechnung-alpenhotel-seeblick.pdf",
  "id": "6f8b0d2f-4b6d-4f8b-8d2f-4b6d8f0b2d44",
  "scanStatus": "CLEAN",
  "sizeBytes": 184320
}

Example request

curl -X POST 'https://api.mbcom.cloud/api/hr/v1/travel-reports/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/receipts' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@document.pdf'

View as Markdown · Interactive reference · OpenAPI