POST /receipts/extract-sync
POST
Synchronous Receipt Extraction (Low-Latency)
Extracts receipt metadata, line items, and proof of payment synchronously in real-time (<6s). Best suited for interactive end-user upload experiences where immediate UI feedback is required without polling or webhooks. For multi-page PDFs or heavy bursts, use the asynchronous endpoint.
Headers
HTTP Headers| Parameter | Type | Description |
|---|---|---|
Authorizationrequired | string | Bearer token format: Bearer <API_KEY> Example: Bearer pep_live_99281a8b |
X-Tenant-IDoptional | string | B2B Tenant identifier. Example: stepup |
Content-Typerequired | string | application/json Example: application/json |
Query Parameters
URL Query String| Parameter | Type | Description |
|---|---|---|
fastModeoptional | boolean default: false | Optimizes latency by skipping deep educational guideline categorization and returning raw line items in <3 seconds. Example: true |
Request Body
application/json| Field | Type | Description |
|---|---|---|
fileUrlrequired | string (URI) | Pre-signed URL or public URL of the receipt image or single-page PDF. Example: https://storage.googleapis.com/partner-uploads/staples_store_receipt.jpg |
fileNameoptional | string | Original receipt filename. Example: staples_store_receipt.jpg |
studentCandidatesoptional | array<StudentCandidate> | Optional students for name matching. |
Responses
4 status codes200 OKReceipt successfully extracted synchronously.
{
"vendor": "Staples Office Supplies",
"amount": 67.48,
"transactionDate": "2026-09-08",
"invoiceType": "retail",
"items": [
{
"description": "TI-84 Plus CE Graphing Calculator Case",
"price": 19.99,
"quantity": 1,
"salesTax": 1.4,
"category": "Instructional Material & Services",
"type": "Curriculum & Books",
"detail": "Math & STEM supplies"
},
{
"description": "College Ruled Spiral Notebook 5-Pack",
"price": 12.5,
"quantity": 1,
"salesTax": 0.88,
"category": "Instructional Material & Services",
"type": "School Supplies",
"detail": "Stationery"
},
{
"description": "Fiskars Student Scissors & Glue Sticks",
"price": 31.25,
"quantity": 1,
"salesTax": 2.19,
"category": "Instructional Material & Services",
"type": "School Supplies",
"detail": "General classroom supplies"
}
],
"paymentDetails": {
"method": "VISA",
"lastFour": "4021",
"paidInFull": true,
"payerName": "Rachel Davis"
},
"studentDetails": {
"matched": true,
"studentId": "stu_1002",
"matchedName": "Emma Davis",
"confidence": 94
},
"confidence": 96,
"auditResult": {
"isValidReceipt": true,
"hasProofOfPayment": true,
"hasItemization": true,
"hasVendorDetails": true,
"missingElements": []
}
}Interactive Test Console
fastMode