Skip to main content
This guide is for partners who used the Receipt API to fetch the receipts of expenses they book in an Accounting System. If you look up receipts outside an export, see Migrate to the Accounting Entries API instead.

New to the Export API (v3)?

Export Workflow Guide

End-to-end walkthrough of the Export API (v3) integration model.

Attachment Handling

Rules for downloading, associating and storing attachments during an export.

API Scopes

Required scopes: export-jobs:write, export-jobs:read, export-items:read.

OAuth Guide

End-to-end OAuth 2.0 workflow guide for Pleo integrations.

Standalone API Key Guide

End-to-end guide for authenticating with standalone API keys.

Migrate from the Expenses API

The full export steps for integrations that used the Expenses API.

What Changes in Your Integration

The Export API (v3) is not a standalone receipt lookup. Pleo now provides each receipt as an attachment on an Export Item. You fetch the Export Items of an Export Job, so the attachments arrive in that response. You no longer call a separate receipt endpoint for each expense.

Fetching Attachments

  1. Detect a pending Export Job and start it with POST /v3/export-job-events and "event": "started". The Export Job is now in_progress.
  2. Fetch the Export Items with GET /v3/export-items?job_id={jobId}. This endpoint is paginated. Use limit to set the page size. To read the next page, send the endCursor from the response as after, until hasNextPage is false.
  3. Read the files[] list on each Export Item. Each entry has a url, a type and a size.
  4. Download each attachment from its url. Then upload it to the entry that you create in the Accounting System.
You need the export-jobs:write scope to start the Export Job and the export-items:read scope to fetch the Export Items. An Export Item has zero, one or several attachments. Pleo includes an attachment only if the file is available at export time and the Export Item passes validation. The maximum size is 30 MB per attachment. Your integration decides whether a missing attachment is an error. For the rules on downloading, merging and retrying, see How to Transfer Attachments.

Field Mapping

The table below maps fields from the legacy Receipt model to their equivalents in the files[] entries of an Export Item.
  • — : field is not available in the Export API (v3)
  • * : data is the same but represented differently

FAQs

Which API replaces the legacy Receipt API?

It depends on whether you run an export.
  • If you book expenses in an Accounting System, use the Export API (v3). It provides receipts as attachments on Export Items.
  • To get receipts outside an Export Job, use the Accounting Entries API.
The Export API (v3) is not a standalone receipt lookup. To choose, see the Legacy Receipt API Overview.

How do I get receipts with the Export API (v3)?

Follow these steps:
  1. Start the Export Job.
  2. Fetch its Export Items with GET /v3/export-items?job_id={jobId}.
  3. Read the files[] list on each item and download each file from its url.
  4. Complete the job after the downloads.
Keep these limits in mind:
  • You can only fetch Export Items while the job is pending or in_progress, so download the files before you complete the job.
  • The url expires 24 hours after you fetch the items.
  • An item has zero, one or several attachments. Each attachment can be up to 30 MB.