Skip to main content
This guide is for partners who used the Expenses API to build custom export integrations to accounting systems. If you were fetching expense data for other workflows, 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.

Integration Design

Rules and requirements for each part of an export integration.

Connect Pleo to a Custom API Integration

How to connect Pleo to route exports to your custom integration.

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.

OAuth with Postman

How to configure Postman to authenticate using OAuth and call the Pleo API.

Standalone API Key Guide

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

Standalone API Keys with Postman

How to make API calls using standalone API keys in Postman.

What Changes in Your Integration

The table below gives a quick overview of how each step maps from the Expenses API to the Export API (v3). The following sections cover each change in detail.

Detecting New Exports

Before:
After: Listen for the v1.export-job.created webhook event.

Starting a Job

Before: Not applicable. After: Create a started event to claim the job before processing.

Fetching Export Items

Before:
After: Fetch the data to export, then the export tracking state of each item.
GET /v3/export-items returns the accounting data. GET /v3/export-jobs/{jobId}/items returns the item IDs and the export tracking state.

Processing Export Items

Before: At integration’s discretion. After: Pleo provides integration design guidelines and a dedicated workflow guide covering bookkeeping methods, accounts mapping, data mapping, attachments, and posting behaviour.

Updating Item Status

Before:
After: Update individual items with granular statuses (in_progress, successful, failed, or abandoned).
Mark every item in_progress before you mark it successful or failed. If you skip this step, the expenses can stay in the Queued tab. See How to Resolve Export Items Stuck in the Export Queue.

Completing the Export

Before:
After: Update item statuses to their final state, then create the event that matches the result: completed if all items succeeded, completed_with_errors if some failed, or failed if all failed. The example below shows completed.

Data Model Changes

The table below maps fields from the Expense model to their equivalents in the Export Item model.
  • — : field is not available in the Export Item model
  • * : data is the same but represented differently. See the Export Item API reference for details.
  • ** : resolved entity relationship: the associated data is included directly, removing the need for additional API calls

FAQs

Which API replaces the legacy Expenses API?

It depends on the use case.
  • To export expenses to an Accounting System, use the Export API (v3).
  • To fetch expense data for dashboards, reports or syncs, use the Accounting Entries API.
Pleo now calls expenses Accounting Entries, so the two terms mean the same thing. To choose, see the Legacy Expense API Overview.

How does the export workflow change from the Expenses API to the Export API (v3)?

The v1.export-job.created webhook replaces polling GET /v1/expenses?status=QUEUED. Then follow these steps:
  1. Start the job with POST /v3/export-job-events and "event": "started".
  2. Fetch the data to export with GET /v3/export-items?job_id={jobId}.
  3. Fetch the export tracking state with GET /v3/export-jobs/{jobId}/items.
  4. Mark every item in_progress with PUT /v3/export-jobs/{jobId}/items. Do not skip this step. If you do, the expenses can stay in the Queued tab.
  5. Export the data to your Accounting System. Then record the result of each item with PUT /v3/export-jobs/{jobId}/items. It has more detailed statuses than PUT /v1/expenses.
  6. Complete the job with POST /v3/export-job-events. Send "event": "completed" if all items succeeded, "completed_with_errors" if some failed, or "failed" if all failed.
See How to Resolve Export Items Stuck in the Export Queue for the full sequence.