Overview

The Export API enables you to export the accounting data managed in Pleo to other external ERP/accounting systems.

💡

Note: The target audience of this API is developer partners and customers who want to export the spend data managed in Pleo to an external accounting system of their choice.

Some of the key features and benefits of this API include:

  • Managing the export workflow with Export Jobs and Export Job Events(for more information, see What are Export Job Events and Export Jobs.
  • The accounting and the bookkeeping information contained in the accounting entries are transformed to exportable data items and packaged as export items. This is done to ensure accurate and transparent transmission of accounting entries from Pleo to the external ERP/accounting system.
  • Tracking the progress of each accounting entry included in an export job through export job items.

What are Export Jobs and Export Job Events?

An export job is the task that manages the export workflow, comprising the export items that are selected for export from Pleo to the external ERP/accounting system.

How is an Export Job Started?

In the Pleo application, when a user selects specific accounting entries and clicks Export, the accounting entries are transformed to export items and are moved to the Export Queue. This triggers an export job that starts transferring the export items from Pleo to the ERP/accounting system.

💡

Note: Please note that an export job tries to transfer the selected export items in a single attempt.

Hence, with an export job, you get the following additional insight:

  • Status and progress of the export workflow:
    The possible values are:
    • pending: The accounting entries are queued for export.
    • failed: The accounting entries could not be exported to the external accounting system.
    • completed: The accounting entries have been successfully exported to the external accounting system.
    • completed_with_errors: The export workflow is complete, yet few accounting entries could not be exported to the external accounting system.
  • Export history logs
  • Orchestrates the entire workflow, like locking the accounting entries being exported from any modification
  • Orchestrates the change of status in expenses

The export job events cause change in status of an export job; when an event is triggered, the status of the corresponding export job is impacted. This is returned in the status parameter of the export-jobs endpoint. For example, when a specific export job has failed, an export job event is triggered with failed value for the event parameter; the reason of failure is also mentioned to understand what caused the problem and how it could be resolved.

Webhook Notifications for Status Change in Export Workflow


When an Export Job Event is triggered, a webhook notification is generated and sent to the external accounting system. Thus, this helps the ERP/accounting system to act in accordance with the event status. For example, if you have subscribed to the v2.export.job-created event, a webhook notification is sent to the external system, notifying that an export workflow is already initiated and a specific set of accounting entries are being currently exported from Pleo to the target system. For more information, see Webhooks.

The response message sent to the external system contains an HTTPS header and a JSON payload. For more information on the content of the header and the response payload, see Webhooks Notifications; the webhook response payload for thev2.export.job-created event is similar with the response sent in Get an Export Job Endpoint .

💡

Note: If webhook implementation is unavailable for any export job event, you might poll GET <https://external.pleo.io/v2/export-jobs> to receive additional information.

Rate Limits

The APIs have a rate limit of 600 requests per minute.