Skip to main content
POST
/
api
/
v1
/
receipts
/
analyze
Analyze Receipt
curl --request POST \
  --url https://api.example.com/api/v1/receipts/analyze \
  --header 'Content-Type: application/json' \
  --data '
{
  "s3_key": "<string>"
}
'
{
  "amount": 4500,
  "date": "2025-02-15",
  "vendor": "Shell Gas Station",
  "category": "travel"
}
Sends an uploaded receipt image to AWS Textract for OCR analysis. Returns extracted fields that can auto-fill an expense form.

Request Body

s3_key
string
required
S3 key of the previously uploaded receipt image.

Response

{
  "amount": 4500,
  "date": "2025-02-15",
  "vendor": "Shell Gas Station",
  "category": "travel"
}
amount
integer
Extracted total amount in cents. May be null if not detected.
date
string
Extracted date in YYYY-MM-DD format. May be null.
vendor
string
Extracted vendor name. May be null.
category
string
Suggested category based on vendor name keywords. May be null.

Errors

StatusCause
400Missing s3_key
422Textract could not analyze the image