POST

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

NameLocationTypeDescription
Idempotency-KeyheaderstringA 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

Required

Schema

merchant_code*string

External merchant code (required)

location_idstring

Optional merchant location identifier

source_typestring

Source type of the receipt data. This helps with routing and processing: - api: Batch or real-time API submissions - sftp: File-based submissions

format_typestring

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

receipts*array

Responses

202 - Batch ingestion accepted for processing

Schema

ingestion_idstring (uuid)

Unique identifier for this batch ingestion request

statusstring

Status of the batch ingestion

sourcestring

Detected source of the receipt data

detailsany
400 - Invalid request

Schema

code*any
message*any
detailsarray

Additional details about the error

request_idstring

Request ID for tracking

"req_123456"
documentation_urlstring (uri)

URL to documentation about the error

"https://docs.receiptrail.com/errors/invalid_request"
statusinteger (int32)

HTTP status code

400
401 - Unauthorized

Schema

code*any
message*any
detailsarray

Additional details about the error

request_idstring

Request ID for tracking

"req_123456"
documentation_urlstring (uri)

URL to documentation about the error

"https://docs.receiptrail.com/errors/invalid_request"
statusinteger (int32)

HTTP status code

401
409 - Duplicate receipt

Schema

code*any
message*any
detailsarray

Additional details about the error

request_idstring

Request ID for tracking

"req_123456"
documentation_urlstring (uri)

URL to documentation about the error

"https://docs.receiptrail.com/errors/invalid_request"
statusinteger (int32)

HTTP status code

409
429 - Too many requests

Schema

code*any
message*any
detailsarray

Additional details about the error

request_idstring

Request ID for tracking

"req_123456"
documentation_urlstring (uri)

URL to documentation about the error

"https://docs.receiptrail.com/errors/invalid_request"
statusinteger (int32)

HTTP status code

429
retry_afterinteger (int32)

Number of seconds to wait before retrying

60
500 - Internal server error

Schema

code*any
message*any
detailsarray

Additional details about the error

request_idstring

Request ID for tracking

"req_123456"
documentation_urlstring (uri)

URL to documentation about the error

"https://docs.receiptrail.com/errors/invalid_request"
statusinteger (int32)

HTTP status code

500