Pleo Export API
Export job management API for packaging and delivering accounting entries to ERP and accounting systems across v0–v3 versioned endpoints.
Export job management API for packaging and delivering accounting entries to ERP and accounting systems across v0–v3 versioned endpoints.
openapi: 3.0.1
info:
title: Export API
description: 'This API enables you to perform the following:
- Retrieve a list of accounting entries that have been exported to the external
ERP/accounting system.
- Create a new export job event.
- Retrieve a list of existing export jobs and create a new one.
- Retrieve details of an export job.
- Retrieve a list of export job items and update their information.
'
termsOfService: https://pleo.io/terms/
contact:
email: [email protected]
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 32.1.0
servers:
- url: https://external.pleo.io
description: Production server
- url: https://external.staging.pleo.io
description: Staging server
security:
- bearerAuth: []
- basicAuth: []
tags:
- name: health
- name: export-items
- name: export-jobs
- name: admin
- name: export-job-items
- name: Export API (v2)
- name: Export Items (v2)
- name: Export API (v3)
- name: Export Items (v3)
paths:
/v0/export-items:
get:
tags:
- Export Items (v0)
summary: Get Export Items
description: Fetch a list of export items that have been marked for export for
a given job. The data for these accounting entries are transformed accordingly
for export purposes.
operationId: getExportItems
parameters:
- name: job_id
in: query
description: The Export Job ID in which the accounting entries have been included
for export.
required: false
style: form
explode: true
schema:
type: string
format: uuid
- name: before
in: query
description: Lower bound of the page of data to return (cannot be used together
with [after] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: after
in: query
description: Upper bound of the page of data to return (cannot be used together
with [before] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: offset
in: query
description: Offset of the page of data to return (cannot be used together
with [before] or [after]).
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int64
- name: limit
in: query
description: The maximum amount of items to return.
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int32
- name: sorting_keys
in: query
description: The keys to sort the results by.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
- name: sorting_order
in: query
description: The order to sort the results by. Must be the same length as
[sortingKeys]; one order per key.
required: false
style: form
explode: true
schema:
type: array
items:
$ref: '#/components/schemas/PageOrder'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CursorPaginatedResponseExportItem'
deprecated: true
/v0/export-job-events:
post:
tags:
- Export API (v0)
summary: Create an Export Job Event
description: "\n The Export Job Events imply the different status\
\ of an Export Job through the export lifecycle.\n Use this endpoint\
\ to create a new status.\n For example, started event implies\
\ the export job is initiated.\n The existing Export Job Events\
\ are as follows:\n - started: An export job is initiated. This\
\ allows the integration\n service to start processing the\
\ export job items.\n - failed: The export job has failed when\
\ an irrecoverable error happens and this could have happened while processing\
\ the export job items.\n - completed: The export job items have\
\ been successfully exported.\n - completed_with_errors: The export\
\ job items have been processed, although some of them could not be exported.\n\
\ "
operationId: createExportJobEvent
requestBody:
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CreateExportJobEvent'
responses:
default:
description: default response
content:
application/json;charset=UTF-8: {}
deprecated: true
/v0/export-jobs:
get:
tags:
- Export API (v0)
summary: Get a list of Export Jobs
description: Fetch a list of export jobs
operationId: getExportJobsList
parameters:
- name: company_id
in: query
description: Enter the specific company ID for which you want to retrieve
the list of export jobs processed before.
required: false
style: form
explode: true
schema:
type: string
format: uuid
- name: status
in: query
description: Fetch a list of jobs for a specific status.
required: false
deprecated: true
style: form
explode: true
schema:
type: string
nullable: true
enum:
- pending
- in_progress
- failed
- completed
- completed_with_errors
- name: statuses
in: query
description: Fetch a list of jobs for specific statuses.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
enum:
- pending
- in_progress
- failed
- completed
- completed_with_errors
- name: before
in: query
description: Lower bound of the page of data to return (cannot be used together
with [after] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: after
in: query
description: Upper bound of the page of data to return (cannot be used together
with [before] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: offset
in: query
description: Offset of the page of data to return (cannot be used together
with [before] or [after]).
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int64
- name: limit
in: query
description: The maximum amount of items to return.
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int32
- name: sorting_keys
in: query
description: The keys to sort the results by.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
- name: sorting_order
in: query
description: The order to sort the results by. Must be the same length as
[sortingKeys]; one order per key.
required: false
style: form
explode: true
schema:
type: array
items:
$ref: '#/components/schemas/PageOrder'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CursorPaginatedResponseExportJob'
deprecated: true
post:
tags:
- Export API (v0)
summary: Create a new export job
operationId: createExportJob
requestBody:
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CreateExportJob'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/DataResponseExportJob'
deprecated: true
/v0/export-jobs/{jobId}:
get:
tags:
- Export API (v0)
summary: Get an Export Job
description: Retrieve an export job for a given export job ID
operationId: getExportJobById
parameters:
- name: jobId
in: path
required: true
style: simple
explode: false
schema:
type: string
description: Export Job ID to fetch
format: uuid
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/DataResponseExportJob'
deprecated: true
/v0/export-jobs/{jobId}/items:
get:
tags:
- Export API (v0)
summary: Get Export Job Items
description: Fetch a list of export job items
operationId: getExportJobItems
parameters:
- name: jobId
in: path
required: true
style: simple
explode: false
schema:
type: string
description: Export Job ID
format: uuid
- name: status
in: query
description: Enter a specific status with which the list of export job items
returned conforms.
required: false
style: form
explode: true
schema:
type: string
nullable: true
enum:
- pending
- in_progress
- failed
- successful
- abandoned
- name: before
in: query
description: Lower bound of the page of data to return (cannot be used together
with [after] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: after
in: query
description: Upper bound of the page of data to return (cannot be used together
with [before] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: offset
in: query
description: Offset of the page of data to return (cannot be used together
with [before] or [after]).
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int64
- name: limit
in: query
description: The maximum amount of items to return.
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int32
- name: sorting_keys
in: query
description: The keys to sort the results by.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
- name: sorting_order
in: query
description: The order to sort the results by. Must be the same length as
[sortingKeys]; one order per key.
required: false
style: form
explode: true
schema:
type: array
items:
$ref: '#/components/schemas/PageOrder'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CursorPaginatedResponseExportJobItem'
deprecated: true
put:
tags:
- Export API (v0)
summary: Update Export Job Items
description: Update the status and other attributes of the export job items
in batches of 100. This API only supports updating up to 100 items.
operationId: updateExportJobItems
parameters:
- name: jobId
in: path
required: true
style: simple
explode: false
schema:
type: string
description: Export Job ID
format: uuid
requestBody:
content:
application/json;charset=UTF-8:
schema:
type: array
items:
$ref: '#/components/schemas/UpdateExportJobItem'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/ExportJobItemUpdate'
deprecated: true
/v1/export-items:
get:
tags:
- Export Items (v1)
summary: Get Export Items
description: Fetch a list of export items that have been marked for export for
a given job. The data for these accounting entries are transformed accordingly
for export purposes.
operationId: getExportItemsV1
parameters:
- name: job_id
in: query
description: The Export Job ID in which the accounting entries have been included
for export.
required: false
style: form
explode: true
schema:
type: string
format: uuid
- name: before
in: query
description: Lower bound of the page of data to return (cannot be used together
with [after] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: after
in: query
description: Upper bound of the page of data to return (cannot be used together
with [before] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: offset
in: query
description: Offset of the page of data to return (cannot be used together
with [before] or [after]).
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int64
- name: limit
in: query
description: The maximum amount of items to return.
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int32
- name: sorting_keys
in: query
description: The keys to sort the results by.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
- name: sorting_order
in: query
description: The order to sort the results by. Must be the same length as
[sortingKeys]; one order per key.
required: false
style: form
explode: true
schema:
type: array
items:
$ref: '#/components/schemas/PageOrder'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CursorPaginatedResponseExportItemV1'
deprecated: true
/v1/export-job-events:
post:
tags:
- Export API (v1)
summary: Create an Export Job Event
description: "\n The Export Job Events imply the different status\
\ of an Export Job through the export lifecycle.\n Use this endpoint\
\ to create a new status.\n For example, started event implies\
\ the export job is initiated.\n The existing Export Job Events\
\ are as follows:\n - started: An export job is initiated. This\
\ allows the integration\n service to start processing the\
\ export job items.\n - failed: The export job has failed when\
\ an irrecoverable error happens and this could have happened while processing\
\ the export job items.\n - completed: The export job items have\
\ been successfully exported.\n - completed_with_errors: The export\
\ job items have been processed, although some of them could not be exported.\n\
\ "
operationId: createExportJobEventV1
requestBody:
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CreateExportJobEvent'
responses:
default:
description: default response
content:
application/json;charset=UTF-8: {}
deprecated: true
/v1/export-jobs:
get:
tags:
- Export API (v1)
summary: Get a list of Export Jobs
description: Fetch a list of export jobs
operationId: getExportJobsListV1
parameters:
- name: company_id
in: query
description: Enter the specific company ID for which you want to retrieve
the list of export jobs processed before.
required: false
style: form
explode: true
schema:
type: string
format: uuid
- name: status
in: query
description: Fetch a list of jobs for a specific status.
required: false
deprecated: true
style: form
explode: true
schema:
type: string
nullable: true
enum:
- pending
- in_progress
- failed
- completed
- completed_with_errors
- name: statuses
in: query
description: Fetch a list of jobs for specific statuses.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
enum:
- pending
- in_progress
- failed
- completed
- completed_with_errors
- name: before
in: query
description: Lower bound of the page of data to return (cannot be used together
with [after] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: after
in: query
description: Upper bound of the page of data to return (cannot be used together
with [before] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: offset
in: query
description: Offset of the page of data to return (cannot be used together
with [before] or [after]).
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int64
- name: limit
in: query
description: The maximum amount of items to return.
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int32
- name: sorting_keys
in: query
description: The keys to sort the results by.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
- name: sorting_order
in: query
description: The order to sort the results by. Must be the same length as
[sortingKeys]; one order per key.
required: false
style: form
explode: true
schema:
type: array
items:
$ref: '#/components/schemas/PageOrder'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CursorPaginatedResponseExportJob'
deprecated: true
post:
tags:
- Export API (v1)
summary: Create a new export job
operationId: createExportJobV1
requestBody:
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CreateExportJob'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/DataResponseExportJob'
deprecated: true
/v1/export-jobs/{jobId}:
get:
tags:
- Export API (v1)
summary: Get an Export Job
description: Retrieve an export job for a given export job ID
operationId: getExportJobByIdV1
parameters:
- name: jobId
in: path
required: true
style: simple
explode: false
schema:
type: string
description: Export Job ID to fetch
format: uuid
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/DataResponseExportJob'
deprecated: true
/v1/export-jobs/{jobId}/items:
get:
tags:
- Export API (v1)
summary: Get Export Job Items
description: Fetch a list of export job items
operationId: getExportJobItemsV1
parameters:
- name: jobId
in: path
required: true
style: simple
explode: false
schema:
type: string
description: Export Job ID
format: uuid
- name: status
in: query
description: Enter a specific status with which the list of export job items
returned conforms.
required: false
style: form
explode: true
schema:
type: string
nullable: true
enum:
- pending
- in_progress
- failed
- successful
- abandoned
- name: before
in: query
description: Lower bound of the page of data to return (cannot be used together
with [after] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: after
in: query
description: Upper bound of the page of data to return (cannot be used together
with [before] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: offset
in: query
description: Offset of the page of data to return (cannot be used together
with [before] or [after]).
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int64
- name: limit
in: query
description: The maximum amount of items to return.
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int32
- name: sorting_keys
in: query
description: The keys to sort the results by.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
- name: sorting_order
in: query
description: The order to sort the results by. Must be the same length as
[sortingKeys]; one order per key.
required: false
style: form
explode: true
schema:
type: array
items:
$ref: '#/components/schemas/PageOrder'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CursorPaginatedResponseExportJobItem'
deprecated: true
put:
tags:
- Export API (v1)
summary: Update Export Job Items
description: Update the status and other attributes of the export job items
in batches of 100. This API only supports updating up to 100 items.
operationId: updateExportJobItemsV1
parameters:
- name: jobId
in: path
required: true
style: simple
explode: false
schema:
type: string
description: Export Job ID
format: uuid
requestBody:
content:
application/json;charset=UTF-8:
schema:
type: array
items:
$ref: '#/components/schemas/UpdateExportJobItem'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/ExportJobItemUpdate'
deprecated: true
/v2/export-items:
get:
tags:
- Export Items (v2)
summary: Get Export Items
description: 'An export item = an accounting entry that has been transformed
into an exportable entry.
The required accounting and bookkeeping information is aggregated from an
accounting entry to become an export item. Use this endpoint to retrieve a
list of export items that have been selected for export. Please note that
you can retrieve list of export items only from `pending` and `in_progress`
export jobs.'
operationId: getExportItemsV2
parameters:
- name: job_id
in: query
description: The Export Job ID in which the accounting entries have been included
for export.
required: false
style: form
explode: true
schema:
type: string
format: uuid
- name: before
in: query
description: Lower bound of the page of data to return (cannot be used together
with [after] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: after
in: query
description: Upper bound of the page of data to return (cannot be used together
with [before] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: offset
in: query
description: Offset of the page of data to return (cannot be used together
with [before] or [after]).
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int64
- name: limit
in: query
description: The maximum amount of items to return.
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int32
- name: sorting_keys
in: query
description: The keys to sort the results by.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
- name: sorting_order
in: query
description: The order to sort the results by. Must be the same length as
[sortingKeys]; one order per key.
required: false
style: form
explode: true
schema:
type: array
items:
$ref: '#/components/schemas/PageOrder'
responses:
'200':
description: Export Items retrieved successfully.
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CursorPaginatedResponseExportItemV2'
'422':
description: Export Job has finished. Only Export Items from running jobs
can be retrieved.
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/ExceptionInfo'
example:
type: EXPORT_JOB_STATUS_UNPROCESSABLE
message: Export Job is finished and can no longer be processed.
/v2/export-job-events:
post:
tags:
- Export API (v2)
summary: Create an Export Job Event
description: "\n The Export Job Events imply the current status of\
\ the Export Job through the export lifecycle.\n Send a request\
\ to this endpoint to update the status of the export job. If an export job\
\ has failed,\n mention the failure reason and the reason type.\n\
\ "
operationId: createExportJobEventV2
requestBody:
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/CreateExportJobEvent'
responses:
'202':
description: Export Job Event created successfully.
'422':
description: Attempted invalid operation (trying to mark a `completed` job
as `started`, and so on.)
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/ExceptionInfo'
example:
type: INVALID_EXPORT_JOB_STATUS_CHANGE
message: Export Job status change failed
/v2/export-jobs:
get:
tags:
- Export API (v2)
summary: Get a list of Export Jobs
description: Fetch a list of export jobs.
operationId: getExportJobsListV2
parameters:
- name: company_id
in: query
description: Enter the specific company ID for which you want to retrieve
the list of export jobs processed before.
required: false
style: form
explode: true
schema:
type: string
format: uuid
- name: status
in: query
description: Fetch a list of jobs for a specific status.
required: false
deprecated: true
style: form
explode: true
schema:
type: string
nullable: true
enum:
- pending
- in_progress
- failed
- completed
- completed_with_errors
- name: statuses
in: query
description: Fetch a list of jobs for specific statuses.
required: false
style: form
explode: true
schema:
type: array
items:
type: string
enum:
- pending
- in_progress
- failed
- completed
- completed_with_errors
- name: before
in: query
description: Lower bound of the page of data to return (cannot be used together
with [after] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: after
in: query
description: Upper bound of the page of data to return (cannot be used together
with [before] or [offset]).
required: false
style: form
explode: true
schema:
pattern: ^[A-Z2-7=~]+$
type: string
- name: offset
in: query
description: Offset of the page of data to return (cannot be used together
with [before] or [after]).
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int64
- name: limit
in: query
description: The maximum amount of items to return.
required: fa
# --- truncated at 32 KB (181 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pleo/refs/heads/main/openapi/pleo-export-openapi.yml