REST /api/v1/receipts 5 endpoints
GET /api/v1/receipts/api/v1/receipts

List receipts for an expense

Public

Response Example

{
  "data": [
    {
      "receipt_id": "rec_7f2a9d",
      "expense_id": "exp_9c2d7e",
      "storage_path": "receipts/org_4729bc/exp_9c2d7e/receipt_1.jpg",
      "url": "https://storage.example.no/receipts/org_4729bc/exp_9c2d7e/receipt_1.jpg",
      "file_size_kb": 84,
      "uploaded_at": "2026-03-18T09:10:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1
  }
}
GET /api/v1/receipts/api/v1/receipts/:id

Get receipt metadata and download URL

Public

Response Example

{
  "receipt_id": "rec_7f2a9d",
  "expense_id": "exp_9c2d7e",
  "organization_id": "org_4729bc",
  "storage_path": "receipts/org_4729bc/exp_9c2d7e/receipt_1.jpg",
  "url": "https://storage.example.no/receipts/org_4729bc/exp_9c2d7e/receipt_1.jpg",
  "mime_type": "image/jpeg",
  "file_size_kb": 84,
  "compressed": true,
  "uploaded_at": "2026-03-18T09:10:00Z"
}
POST /api/v1/receipts/api/v1/receipts

Upload a receipt image (multipart/form-data)

Public

Request Example

{
  "expense_id": "exp_9c2d7e",
  "organization_id": "org_4729bc",
  "file": "<binary image data — multipart field>",
  "compress": true,
  "max_size_kb": 500
}

Response Example

{
  "receipt_id": "rec_7f2a9d",
  "expense_id": "exp_9c2d7e",
  "storage_path": "receipts/org_4729bc/exp_9c2d7e/receipt_1.jpg",
  "url": "https://storage.example.no/receipts/org_4729bc/exp_9c2d7e/receipt_1.jpg",
  "file_size_kb": 84,
  "compressed": true,
  "uploaded_at": "2026-03-18T09:10:00Z"
}
PUT /api/v1/receipts/api/v1/receipts/:id

Replace receipt file (re-upload)

Public

Request Example

{
  "file": "<binary image data — multipart field>",
  "compress": true,
  "max_size_kb": 500
}

Response Example

{
  "receipt_id": "rec_7f2a9d",
  "storage_path": "receipts/org_4729bc/exp_9c2d7e/receipt_1_v2.jpg",
  "url": "https://storage.example.no/receipts/org_4729bc/exp_9c2d7e/receipt_1_v2.jpg",
  "file_size_kb": 72,
  "updated_at": "2026-03-18T09:12:00Z"
}
DELETE /api/v1/receipts/api/v1/receipts/:id

Delete a receipt from storage

Public

Response Example

{
  "deleted": true,
  "receipt_id": "rec_7f2a9d"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}