Accounting documents

The accounting document is usually part of a document.

Attributes of accounting documents

In the first step a document is classified. A classification can be i.e. receipt, income_statement or dunning. Only a subset of an accounting document warrant extraction of financial data. Based on its classification a document will have varying attributes reflecting the content.

As soon as the document has been processed, information on the document is available along with further data (if the document is among those documents with additional extraction). Accounting documents are in general readonly and will not be specified any further.

Head attributes

created_at Date The document creation date.
updated_at Date The document update date.
invoice_date Date Issue date of the invoice
delivery_date Date Date of delivery
number String Invoice number
order_number String PO numbers, Order number etc…
invoice_number String Invoice reference number (only for Credit Note and Dunning w/ and w/o Fees)
currency String 3 letter ISO Code of the currency
items Array List of line items, if applicable (see below).
payment_conditions Array List of payment conditions (see below).
bank_accounts Array List of bank accounts (see below).
payment_method String If it has been paid, this is the payment method (see below).
reference String Reference number
discount_rate Float Discount rate of the invoice
esr Object ESR (Einzahlungsschein mit Referenznummer) data (see below)
es Object ES (Einzahlungsschein ohne Referenznummer) data (see below)
amount_details Array Total Gross, Net, Tax amounts, and amounts per tax rate (Array). (see below)

Line Item Data attributes

Line items are added to the field items. It is an array of objects with the following fields.

title String The title of the line item.
amount_total Float The total of the line item.
nominal_account String A reference to the internal nominal account.
tax_rate Float This is the tax rate of the line item.
article_number String This is the article_number of the line item.
unit String This is the unit of the line item.
quantity Float This is the quantity the line item.
discount_rate Float This is the discount rate of the line item.
amount_unit String This is the amount_unit of the line item.
order_number String Order number for the item group *
delivery_note_number String Delivery note number for the item group *
delivery_date String Delivery date for the item group *

* item groups: on some documents, line items are grouped, listing information that is applicable to all items in the group in a “header” per group. This intormation is captured on all items for your convenience.

Payment method

The attribute payment_method holds one of the following, if the document relates to an already completed payment:

maestro Maestro / PostFinance
creditcard Credit Card
paypal Paypal
stripe Stripe
vpay V PAY
direct_debit LSV
bank_transfer Wire Transfer
cash Cash
other Other

Bank accounts

If bank accounts have been found, they are added to the field bank_accounts. It is an array of objects containing these fields:

iban String IBAN
bic String BIC
account_number String Account number

Payment conditions

There is a defined set of available payment conditions. This is an array containing individual conditions which are stored as objects in the field payment_conditions.

Potential attributes of payment conditions:

percentage Integer Amount of percentage between 0 and 100.
fixed_price Float Fixed amount as a decimal number.
number_of_days Integer Number of days until the payment is due.
date Date Specific date until when the payment is due.

Payment conditions:

Type of condition Used attributes  
payment_condition number_of_days, date Due date of the invoice.
cash_discount percentage, fixed_price, number_of_days, date Cash discount including amount and date.
wir percentage, fixed_price Amount of swiss currency WIR.
installment percentage, fixed_price, number_of_days, date Installment settings including amount and date.
prepayment none Invoice has to be paid upfront.

ESR data

If ESR data has been found, it is added to the field esr, which is an object with the following fields:

amount_esr String The ESR ammount.
account_esr String The ESR account number.
reference_esr String The ESR refernce number.
codingline_esr String The full ESR coding line.

ES data

If ES data has been found, it is added to the field es, which is an object with the following fields:

es_amount String The ES amount.
es_purpose String The ES purpose.
es_account String The ES account.
es_iban String The ES IBAN account, if both creditor and ultimate creditor are given.
es_creditor String The name/address if the receiver or intermediary.
es_ultimate_creditor String The name/address if the ultimate beneficiary.

Amount details

Amounts are collected in the field amount_details, which is an object with the following fields:

gross_amount_total String Gross total amount.
tax_amount_total String Tax total amount.
net_amount_total String Net total amount.
partial_amounts Array Gross, Tax, Nett amounts per tax rate (see below)

Partial Amounts:

tax_rate String Tax percentage between 0.00 and 100.00
net_amount String Nett amount for this tax rate.
tax_amount Tax amount for this tax rate.  
gross_amount Gross amount for this tax rate.