Skip to main content
POST
/
api
/
v1
/
receipts
/
upload-url
Get Receipt Upload URL
curl --request POST \
  --url https://api.example.com/api/v1/receipts/upload-url \
  --header 'Content-Type: application/json' \
  --data '
{
  "file_name": "<string>",
  "content_type": "<string>",
  "file_size": 123
}
'
{
  "uploadUrl": "https://s3.amazonaws.com/bucket/receipts/1/abc123.jpg?...",
  "s3Key": "receipts/1/abc123.jpg"
}
Generates a presigned S3 URL for uploading a receipt image. The URL expires after a short period.

Request Body

file_name
string
required
Original file name (e.g., receipt.jpg).
content_type
string
required
MIME type. Must be image/jpeg or image/png.
file_size
integer
required
File size in bytes. Must be 1–10,485,760 (10MB).

Response

{
  "uploadUrl": "https://s3.amazonaws.com/bucket/receipts/1/abc123.jpg?...",
  "s3Key": "receipts/1/abc123.jpg"
}
After receiving the URL, upload the file directly to S3 using a PUT request with the file body and matching Content-Type header.