Receipt Upload Service
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
4
Entities
0
Integrations
Description
Backend service that accepts receipt image uploads, compresses and validates them, and persists the binary to managed object storage. Returns a stable receipt reference that the expense record links to and enforces tenant-scoped access on every read.
receipt-upload-service
Sources & reasoning
Section 2.1 explicitly requires receipt photos above a 100 NOK threshold for HLF. Receipt upload is a direct sub-capability of the travel reimbursement workflow listed in Phase 2 (Core Product) in section 5.
-
docs/source/likeperson.md · line 42Kvitteringsbilde for utlegg over 100 kr (HLF).
-
docs/source/likeperson.md · line 311Reiserefusjon
Responsibilities
- Validate incoming image format, size, and MIME type
- Compress and normalise images before storage
- Write objects to managed storage and return a receipt reference
- Enforce tenant and expense-level access scoping on fetch
- Emit audit events for upload, replace, and retrieval actions
Interfaces
uploadReceipt(expenseId, fileStream, mimeType): ReceiptRef
getReceipt(receiptId, requesterContext): ReceiptStreamUrl
deleteReceipt(receiptId, requesterContext): void
listReceiptsForExpense(expenseId): ReceiptRef[]
Related Data Entities (4)
Data entities managed by this component