Use case / Expense operations
Receipt fields without manual rekeying.
Define the small, stable receipt object your expense workflow needs instead of wiring downstream systems to raw OCR text.
Example schema
Ask for the fields that move work forward.
Field names, types, and descriptions travel with every extraction request, so the response matches the object your code already expects.
merchant_nametransaction_numbertransaction_datetotal_amountpayment_methodResponse
What your integration receives.
The terminal result for the schema above. Validate it against your own types before writing to a system of record.
const { result } = await client.extractFile({
file,
idempotencyKey,
input: { fileName, mediaType, sizeBytes },
schema: {
version: "1",
fields: [
{ name: "merchant_name", type: "string" },
{ name: "transaction_number", type: "string" },
{ name: "transaction_date", type: "string" },
{ name: "total_amount", type: "number" },
{ name: "payment_method", type: "string" }
]
}
});
{
"merchant_name": "Northstar Cafe",
"transaction_number": "TXN-7314",
"transaction_date": "2026-07-02",
"total_amount": 18.75,
"payment_method": "Visa"
}
Production path
From document to validated workflow input.
- Choose the fields needed for reconciliation.
- Upload a supported receipt image with tenant authentication.
- Submit an asynchronous job using the same schema contract.
- Route missing or uncertain values to review.
FAQ
Frequently asked questions
Can I choose which receipt fields are returned?
Yes. The submitted schema defines the expected field names, types, descriptions, and requirements.
Does Routeser replace expense-policy validation?
No. Extraction produces structured data; your application remains responsible for expense policy and approval decisions.
How are receipt totals typed?
Declare monetary fields as numbers. An explicit type is what makes downstream normalization deterministic.
Next step
Run this schema on your own documents
Open the console to define these fields in a workspace and evaluate them against real documents.