Accounting export
Learn how to export all payables and receivables from Monite, so you can use this data in an external accounting solution.
Overview
Monite allows entities to export all of their payables and receivables, so they can use this data in their accounting solutions.
The result of the export is a ZIP file containing either PDF documents or structured data in CSV format, in separate files for both accounts payable and accounts receivable.
The export must be limited to specific start and end dates.
Export the accounting data
To export the documents of a specific entity, call POST /data_exports
specifying the desired format
(PDF or CSV), the object types (payable
and/or receivable
) and status, and the date range:
curl -X POST 'https://api.sandbox.monite.com/v1/data_exports' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"format": "csv",
"objects": [
{
"name": "payable",
"statuses": [
"new"
]
},
{
"name": "receivable",
"statuses": [
"draft"
]
}
],
"date_from": "2022-08-10",
"date_to": "2022-08-18"
}'
The successful response contains the export ID:
{
"id": "edb064b2-af7f-4730-9b73-38c699c383d9"
}
To get the link to download the exported files, call GET /data_exports/{data_export_id}
passing the previously obtained data export ID in the URL:
curl -X 'https://api.sandbox.monite.com/v1/data_exports/{data_export_id}' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN'
The successful response contains information about the export and the source_url
that can be used to download the exported file:
{
"source_url": "https://monite-file-saver-zip-eu-central-1-sandbox.s3.com/1a65fd3b-...22c4/02825c72-...f04c.zip",
"entity_id": "c23dd09c-077a-4afa-914f-f53fc2748ec4",
"start_datetime": "2022-08-17T13:48:57.455932+00:00",
"end_datetime": "2022-08-17T13:48:57.584375+00:00",
"count": 5,
"id": "edb064b2-af7f-4730-9b73-38c699c383d9",
"language": "pt-br,pt;q=0.9,en-us;q=0.8,en;q=0.7",
"status": "done",
"created_by_entity_user_id": null,
"format": "csv"
}
Bigger exports may take longer to be processed. Meanwhile, their status are presented as
pending
until the export is completed and the file is available for download.
Check all data exports
To check all the requested data exports, call GET /data_exports
:
curl -X GET 'https://api.sandbox.monite.com/v1/data_exports' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN'
The successful response contains a list of all data exports requested:
{
"data": [
{
"status": "done",
"source_url": "https://monite-file-saver-zip-eu-central-1-sandbox.s3.amazonaws.com/1a65fd...22c4/02825c...ff04c.zip",
"start_datetime": "2022-08-17T13:48:57.455932+00:00",
"format": "csv",
"end_datetime": "2022-08-17T13:48:57.584375+00:00",
"created_by_entity_user_id": null,
"language": "pt-br,pt;q=0.9,en-us;q=0.8,en;q=0.7",
"entity_id": "c23dd09c-077a-4afa-914f-f53fc2748ec4",
"id": "edb064b2-af7f-4730-9b73-38c699c383d9",
"count": 5
}
],
"prev_pagination_token": null,
"next_pagination_token": null
}
Updated 19 days ago