Skip to main content
POST
/
v1
/
receipts
/
export
Export receipts
curl --request POST \
  --url https://api.truthlocks.com/v1/receipts/export \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "receipt_type": "<string>",
  "from": "<string>",
  "to": "<string>",
  "format": "json"
}
'
{
  "export_id": "<string>",
  "status": "<string>",
  "download_url": "<string>"
}
Queues an async bulk export job. Returns immediately with status: pending. Poll GET /v1/receipt-exports/{id} for completion and a pre-signed download URL.

Request

format
string
required
Export format: json or csv.
filters
object
Optional filters to narrow the export.
filters.receipt_type
string
Filter by receipt type name (e.g. payment_receipt).
filters.status
string
Filter by receipt status: active, revoked, superseded, redacted.
filters.from_date
string
Start of date range (RFC 3339).
filters.to_date
string
End of date range (RFC 3339).

Response

export_id
string
UUID of the export job.
status
string
pending | running | complete | failed
format
string
Requested format (json or csv).
created_at
string
ISO 8601 timestamp.

Polling for completion

Poll GET /v1/receipt-exports/{export_id} until status is complete. The response will include a pre-signed download_url.
This endpoint moved from /v1/receipts/export/{id} to /v1/receipt-exports/{id}. Update any polling URLs that use the old path.

Export status values

StatusMeaning
pendingQueued, not yet started
runningProcessing records
completeDone — download_url is available
failedError — see error_message

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Body

application/json
receipt_type
string
from
string
to
string
format
enum<string>
default:json
Available options:
json,
csv

Response

Export initiated

export_id
string
status
string
download_url
string | null