Invoice
https://app.iteras.dk/api/customers/invoice/
The /api/customers/invoice/ endpoint invoices a number of invoice lines on a customer.
Parameters
-
id string requiredID of the customer.
-
business_entity stringThe external ID of the business entity to invoice for. Must be specified if
subscription_idis not given. -
subscription_id stringIf the invoice lines concern a certain subscription.
-
period string Defaults to
currentEithercurrentor the index of the period, with 1 being the oldest period, in case asubscription_idis specified, e.g."period": "1". Note that invoice lines never bind to the subscription directly but always a specific period of the subscription. -
lines array requiredThe lines to invoice. See the line attributes below.
-
due stringDate the invoice is due, e.g.
2026-11-09. If not filled in, the due date is calculated from the internal rules in Iteras. -
send boolean Defaults to
trueSet tofalseto prevent the invoice being sent. This can be useful when importing old debt. -
note stringInternal note attached to the invoice.
Each element of lines is an object with the following
attributes:
-
text string requiredDescription of what is invoiced, may contain newlines, e.g.
Extra service\nLine 2. -
amount integer requiredInteger amount (send €10.50 as
1050), including any tax. -
currency string requiredThree-letter ISO currency code, e.g.
EUR. The currency must match the invoice/business entity. -
tax_rate number requiredThe tax rate applied to the line, e.g.
0.25for 25% tax. Set it to 0 for lines that are exempt from tax.
Examples
Invoice two lines on a subscription period:
POST /api/customers/invoice/ HTTP/1.1
Content-Type: application/json{
"id": "12345",
"lines": [{
"text": "Product A",
"amount": 10050,
"currency": "DKK",
"tax_rate": 0.25
}, {
"text": "Shipping",
"amount": 2050,
"currency": "DKK",
"tax_rate": 0
}],
"subscription_id": "32142532",
"due": "2026-11-09"
}Invoice a balance from an old system, without sending it:
POST /api/customers/invoice/ HTTP/1.1
Content-Type: application/json{
"id": "12345",
"lines": [{
"text": "Unpaid amount from Jan-Feb",
"amount": 56095,
"currency": "DKK",
"tax_rate": 0.25
}],
"business_entity": "DKbranch",
"due": "2026-11-09",
"send": false,
"note": "Balance from old system"
}The endpoint returns the number of the new invoice:
{ "invoice_number": "1007" }
Errors
Invalid requests due to programming error, e.g. invalid JSON, returns 400.
This also covers a missing lines array, a tax_rate
outside the range 0-1, and more than one distinct non-zero
tax_rate on an invoice.
A well-formed operation where a supplied value is invalid is not executed and returns an HTTP 422 error. The response is a JSON object with the errors keyed by the field they concern, e.g. a currency that doesn't match the business entity:
{
"lines": ["Invalid currency: EUR"]
}
Errors that are not specific to a field are returned with the empty string as key, e.g. an unknown subscription, period or business entity:
{
"": ["Business entity does not exist."]
}