# Accounting transactions

The /api/accountingtransactions/ endpoint enables you to download accounting transactions for exports configured in Iteras. Accounting transactions exports can be set up in the accounting transactions section.

# Parameters

The endpoint uses GET and currently supports the following parameters, both dates are inclusive:

  • "export" - The ID of the accounting transactions export to retrieve data for, e.g. ?export=annual_export

  • "start_date" - e.g. 2021-02-01 (inclusive)

  • "end_date" - e.g. 2021-02-28 (inclusive)

  • "encoding" - character set of returned CSV file, ISO-8559-1 or UTF-8

# Return value

Streams data for the export as a CSV file, in the same format as you get if you download the export inside Iteras.

# Example

The endpoint can be used to automatically download accounting transactions on a regular basis. For instance, you could daily fetch yesterday's data with something like:

curl --request GET "https://app.iteras.dk/api/accountingtransactions/?export=annual_report&start_date=`date -d yesterday +%F`&end_date=`date -d yesterday +%F`" \
     --header "X-Iteras-Key: <Iteras API key>" \
     -OJ  # output the file to the standard Iteras filename supplied in the HTTP header