# Revenue report
The /api/revenuereport/
endpoint enables
you to download a revenue report in CSV format.
# Parameters
The endpoint uses GET and currently supports the following parameters, both dates are inclusive:
"calculate" - must be either
invoiced
,accrued
ornotyetaccrued
"start_date" - e.g.
2025-01-26
(inclusive)"end_date" - e.g.
2025-04-25
(inclusive)"columns" - a comma separated list of columns to include in the export. Options are
invoices
,without_vat
,vat
,with_vat
. A minimum of one choice is required."distribute_on" (optional) - e.g.
country
. Run the report within Iteras and observe the exact terms from the URL. A maximum of four choices are allowed."product" (optional) - use
external_id
of the products and/or the stringnone
for targeting "no product" (for fees etc.)"business_entity" (optional) - the external ID of the business entity to make the report for, must be specified if
product_id
is not given"encoding" - (optional) character set of returned CSV file,
UTF-8
orISO-8559-1
. If none is specified the report will be encoded with UTF-8.
# Return value
Returns the report data 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 a renevue report on a regular basis. For instance, you could monthly fetch last 30 days data with something like:
curl --request GET "https://app.iteras.dk/api/revenuereport/?calculate=invoiced&start_date=2025-03-26&end_date=2025-04-25&columns=invoices,with_vat&product=452&distribute_on=country&distribute_on=field:petowner " \
--header "X-Iteras-Key: <Iteras API key>" \
-OJ # output the file to the standard Iteras filename supplied in the HTTP header