REST /api/v1/receipt-images 5 endpoints
GET /api/v1/receipt-images/api/v1/receipt-images

List compressed receipt images on record

Public

Response Example

{
  "data": [
    {
      "image_id": "img-5501",
      "original_file_name": "receipt_20260322.jpg",
      "original_size_kb": 2048,
      "compressed_size_kb": 198,
      "compression_ratio": 0.097,
      "mime_type": "image/jpeg",
      "status": "compressed",
      "created_at": "2026-03-22T10:10:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1
  }
}
GET /api/v1/receipt-images/api/v1/receipt-images/:imageId

Get metadata for a specific compressed receipt image

Public

Response Example

{
  "image_id": "img-5501",
  "original_file_name": "receipt_20260322.jpg",
  "original_size_kb": 2048,
  "compressed_size_kb": 198,
  "compression_ratio": 0.097,
  "max_size_kb": 500,
  "mime_type": "image/jpeg",
  "is_acceptable": true,
  "created_at": "2026-03-22T10:10:00Z"
}
POST /api/v1/receipt-images/api/v1/receipt-images/compress

Compress an uploaded receipt image

Public

Request Example

{
  "content_type": "multipart/form-data",
  "fields": {
    "image_file": "(binary data)",
    "max_size_kb": 500
  }
}

Response Example

{
  "image_id": "img-5502",
  "original_file_name": "receipt_hotel_night.jpg",
  "original_size_kb": 3200,
  "compressed_size_kb": 487,
  "compression_ratio": 0.152,
  "mime_type": "image/jpeg",
  "is_acceptable": true,
  "download_url": "/api/v1/receipt-images/img-5502/download",
  "created_at": "2026-03-26T09:30:00Z"
}
POST /api/v1/receipt-images/api/v1/receipt-images/size-check

Estimate compressed size and acceptability before full upload

Public

Request Example

{
  "content_type": "multipart/form-data",
  "fields": {
    "image_file": "(binary data)"
  }
}

Response Example

{
  "original_size_kb": 3200,
  "estimated_compressed_size_kb": 490,
  "max_allowed_size_kb": 500,
  "is_acceptable": true,
  "recommendation": "proceed"
}
DELETE /api/v1/receipt-images/api/v1/receipt-images/:imageId

Delete a compressed receipt image record

Public

Response Example

{
  "image_id": "img-5501",
  "status": "deleted",
  "deleted_at": "2026-03-26T09:35:00Z"
}

Additional Metadata

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