Receipt Storage Repository
API Contract
REST
/api/v1/receipt-storage
5 endpoints
GET
/api/v1/receipt-storage/api/v1/receipt-storage
List stored receipt objects for the authenticated user/org
Public
Response Example
{
"data": [
{
"storage_path": "orgs/org-42/users/usr-88/claims/clm-301/receipts/att-7821.jpg",
"file_name": "att-7821.jpg",
"file_size_kb": 184,
"org_id": "org-42",
"user_id": "usr-88",
"claim_id": "clm-301",
"uploaded_at": "2026-03-22T10:14:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1
}
}
GET
/api/v1/receipt-storage/api/v1/receipt-storage/:storagePath/signed-url
Get a time-limited signed URL to access or download a stored receipt
Public
Response Example
{
"storage_path": "orgs/org-42/users/usr-88/claims/clm-301/receipts/att-7821.jpg",
"signed_url": "https://storage.example.com/orgs/org-42/.../att-7821.jpg?token=abc123xyz&expires=1743080400",
"expires_at": "2026-03-26T10:00:00Z"
}
POST
/api/v1/receipt-storage/api/v1/receipt-storage
Upload a receipt file to storage
Public
Request Example
{
"content_type": "multipart/form-data",
"fields": {
"file": "(binary JPEG data)",
"org_id": "org-42",
"user_id": "usr-88",
"claim_id": "clm-305"
}
}
Response Example
{
"storage_path": "orgs/org-42/users/usr-88/claims/clm-305/receipts/att-7830.jpg",
"file_name": "att-7830.jpg",
"file_size_kb": 220,
"org_id": "org-42",
"user_id": "usr-88",
"claim_id": "clm-305",
"upload_progress_url": "/api/v1/receipt-storage/upload-progress/clm-305",
"uploaded_at": "2026-03-26T09:45:00Z"
}
GET
/api/v1/receipt-storage/api/v1/receipt-storage/upload-progress/:claimId
Stream upload progress for a receipt upload (Server-Sent Events)
Public
Response Example
{
"event": "progress",
"data": {
"claim_id": "clm-305",
"percent": 82,
"bytes_transferred": 184320,
"bytes_total": 225280,
"status": "uploading"
}
}
DELETE
/api/v1/receipt-storage/api/v1/receipt-storage/:storagePath
Delete a receipt from storage
Public
Response Example
{
"storage_path": "orgs/org-42/users/usr-88/claims/clm-305/receipts/att-7830.jpg",
"status": "deleted",
"deleted_at": "2026-03-26T09:50:00Z"
}