Learn how to bulk export your Accounts Payable and Accounts Receivable data from Monite, so you can use this data in an external accounting system.

Overview

Monite allows entities to export all their accounts payable, so they can integrate this data into their accounting systems.

The exported payables data are structured in CSV format and must be selected by specific statuses, and start and end dates.

Compatible accounting systems

Currently, Monite supports accounting data export to Xero. More export formats will be added in the future.

Xero

The Xero export contains just the essential data for Xero to execute the import. Monite does not validate the exported data. To check Xero’s requirements and validations, check the Xero documentation.

Considerations

  • Counterpart-related data is exported only for payables that have been submitted for approval as the information about the counterparts is inserted into the payables only at this status.

  • The prices in the exported data are tax-exclusive, that is, do not include taxes.

Export the accounting data

To export the accounting data of a specific entity, call POST /data_exports and specify the desired format (csv_xero), the object type name (in this example - payable) and statuses, and the date range:

1curl -X POST 'https://api.sandbox.monite.com/v1/data_exports' \
2 -H 'X-Monite-Version: 2024-05-25' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "format": "csv_xero",
8 "objects": [
9 {
10 "name": "payable",
11 "statuses": [
12 "new"
13 ]
14 }
15 ]
16 "date_from": "2022-08-10",
17 "date_to": "2022-08-18"
18 }'

The successful response contains the data export ID:

1{
2 "id": "edb064b2-af7f-4730-9b73-38c699c383d9"
3}

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:

1curl -X GET 'https://api.sandbox.monite.com/v1/data_exports/{data_export_id}' \
2 -H 'X-Monite-Version: 2024-05-25' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'

The successful response contains information about the data export and the source_url field, which contains the URL to download the exported file:

1{
2 "source_url": "https://monite-file-saver-zip-eu-central-1-sandbox.s3.com/1a65fd3b-...22c4/02825c72-...f04c.zip",
3 "entity_id": "c23dd09c-077a-4afa-914f-f53fc2748ec4",
4 "start_datetime": "2022-08-17T13:48:57.455932+00:00",
5 "end_datetime": "2022-08-17T13:48:57.584375+00:00",
6 "count": 5,
7 "id": "edb064b2-af7f-4730-9b73-38c699c383d9",
8 "language": "pt-br,pt;q=0.9,en-us;q=0.8,en;q=0.7",
9 "status": "done",
10 "created_by_entity_user_id": null,
11 "format": "csv_xero"
12}

The file is exported in the ZIP format which includes one or more CSV files, depending on the amount of entries. Each file can contain up to 100 payables with multiple line items per payable.

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.

This is how the fields between Monite and Xero are associated:

Monite fieldXero field
counterpart.name*ContactName
counterpart.emailEmailAddress
counterpart.address.line1POAddressLine1
counterpart.address.line2POAddressLine2
counterpart.address.cityPOCity
counterpart.address.statePORegion
counterpart.address.postal_codePOPostalCode
counterpart.countryPOCountry
document_id*InvoiceNumber
issued_at*InvoiceDate
due_date*DueDate
line_items.descriptionDescription
line_items.quantity*Quantity
line_items.unit_price*UnitAmount
line_items.account_code*AccountCode
line_items.tax_type*TaxType

All the fields are obtained from the payables object, except tax_type and account_code, which are obtained from the /extra_data settings.

You can configure default values for specific fields in the exported data to streamline the CSV processing and reduce manual work.

Currently, it is possible to set default values for the account code (default_account_code) and tax rate code (default_tax_rate_code) fields, which are mapped to *AccountCode and *TaxType respectively on Xero.

Additionally, the counterpart_id obtained from exported payables is used to search for entries corresponding to this counterpart_id in the Monite system. If a corresponding register is found, i.e. this counterpart already exists in the Monite system, the exported data is enriched with the counterpart information.

To create a default value for a specific field, send a POST request to the /data_exports/extra_data endpoint specifying the :

1curl -X POST 'https://api.sandbox.monite.com/v1/data_exports/extra_data' \
2 -H 'X-Monite-Version: 2024-05-25' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'
5 -H 'Content-Type: application/json' \
6 -d '{
7 "object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
8 "object_type": "counterpart",
9 "field_name": "default_account_code",
10 "field_value": "100100"
11 }'

The successful response contains information about the default value:

1{
2 "id": "4a9053d5-4023-400e-ab00-47adf7737022",
3 "object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4 "object_type": "counterpart",
5 "field_name": "default_account_code",
6 "field_value": "100100",
7 "created_at": "2023-10-05T07:29:17.332Z",
8 "updated_at": "2023-10-05T07:29:17.332Z",
9 "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
10}

List all default values

To get information about all default values, call GET /data_exports/extra_data.

Retrieve a default value

To get information about a specific default value, call GET /data_exports/extra_data/{extra_data_id} endpoint.

Update a default value

To edit an existing default value, call PATCH /data_exports/extra_data/{extra_data_id} endpoint.

Delete a default value

To delete an existing default value, call DELETE /data_exports/extra_data/{extra_data_id} endpoint.

Check all data exports

To check all the requested data exports, call GET /data_exports endpoint:

1curl -X GET 'https://api.sandbox.monite.com/v1/data_exports' \
2 -H 'X-Monite-Version: 2024-05-25' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'

The successful response contains a list of all data exports requested:

1{
2 "data": [
3 {
4 "status": "done",
5 "source_url": "https://monite-file-saver-zip-eu-central-1-sandbox.s3.amazonaws.com/1a65fd...22c4/02825c...ff04c.zip",
6 "start_datetime": "2022-08-17T13:48:57.455932+00:00",
7 "format": "csv_xero",
8 "end_datetime": "2022-08-17T13:48:57.584375+00:00",
9 "created_by_entity_user_id": null,
10 "language": "pt-br,pt;q=0.9,en-us;q=0.8,en;q=0.7",
11 "entity_id": "c23dd09c-077a-4afa-914f-f53fc2748ec4",
12 "id": "edb064b2-af7f-4730-9b73-38c699c383d9",
13 "count": 5
14 }
15 ],
16 "prev_pagination_token": null,
17 "next_pagination_token": null
18}