Submit receipts
/ingestor/receipts/ingest
Endpoint for receipt ingestion from any merchant source. This endpoint accepts receipts in any format from POS devices, webhooks, APIs, SFTP, or any other merchant system. The system automatically detects and processes the receipt format, ensuring merchant compliance rather than requiring merchants to adapt to our API structure. Clients must provide merchant_code (required) and may provide location_id (optional). Integration configuration is managed by onboarding and looked up internally. Supported sources include: - POS devices (real-time transaction-triggered) - Webhooks (direct merchant or POS platform integration) - APIs (batch or real-time submissions) - SFTP (file-based submissions) - Raw data (manual submissions)
Parameters
| Name | Location | Type | Description |
|---|---|---|---|
| Idempotency-Key | header | string | A unique key to ensure idempotent processing of requests. If the same key is used in a subsequent request with the same payload, the original response will be returned. If not provided, a UUID will be auto-generated. |
Request Body
Schema
External merchant code (required)
Optional merchant location identifier
Source type of the receipt data. This helps with routing and processing: - api: Batch or real-time API submissions - sftp: File-based submissions
Format type of the receipt data: - json: Structured JSON data - xml: XML formatted data - csv: Comma-separated values - html: HTML formatted receipt - base64: Base64-encoded media (PDF, image, etc.) - raw: Raw text or binary data
Responses
Schema
Unique identifier for this batch ingestion request
Status of the batch ingestion
Detected source of the receipt data
Schema
Additional details about the error
Request ID for tracking
"req_123456"
URL to documentation about the error
"https://docs.receiptrail.com/errors/invalid_request"
HTTP status code
400
Schema
Additional details about the error
Request ID for tracking
"req_123456"
URL to documentation about the error
"https://docs.receiptrail.com/errors/invalid_request"
HTTP status code
401
Schema
Additional details about the error
Request ID for tracking
"req_123456"
URL to documentation about the error
"https://docs.receiptrail.com/errors/invalid_request"
HTTP status code
409
Schema
Additional details about the error
Request ID for tracking
"req_123456"
URL to documentation about the error
"https://docs.receiptrail.com/errors/invalid_request"
HTTP status code
429
Number of seconds to wait before retrying
60
Schema
Additional details about the error
Request ID for tracking
"req_123456"
URL to documentation about the error
"https://docs.receiptrail.com/errors/invalid_request"
HTTP status code
500
