Resource: accounting.nv
HTTP-method: POST
Note! A transaction payment for web invoice will be charged for each voucher attachment imported to Netvisor via interface.
Vouchers, voucher lines, the lines' dimensions and attachments can be imported into accounting materials. The request must be directed to Accounting.nv resource without parameters. One request can only carry one voucher. If voucher's id is not given, the system automatically assigns a new id for it.
Allowed types of vouchers are (Finnish names must be used in voucherclass field when importing data):
- Sales invoice (myyntilasku)
- Sales payment (myyntisuoritus)
- Bank (pankki)
- Treasury (kassa)
- Imported events (tuodut tapahtumat)
- Automatic financial statements (automaattiset tilinpäätöskirjaukset)
- Vouchers formed by the system (Järjestelmän muodostamat)
- Purchase invoice (ostolasku)
- Purchase payment (ostosuoritus)
- Others (muut)
- Accruals (jaksotukset)
- Salaries (Palkka, PA)
Voucher line's sum's type, net or gross, is chosen for each voucher. If the type is net, the system will not automatically calculate VAT lines and rounding difference lines, and the voucher will be exactly as the imported material. When type is gross, VAT and rounding difference lines will be automatically calculated by the system.
The account chosen for the voucher must be found from the system, otherwise an INVALID_DATA error with further information is returned. VAT code is retrieved from the chosen account if it has not been specified. If the user enters a VAT code that conflicts with the VAT rate entered for the line, an error is returned with further information.
There must be always debit and credit sides when importing a voucher. Positive sum is recorded as debit and negative sum as credit. If the debit and credit entries do not match, the difference is automatically recorded in rounding differences.
One voucher line can relate to several dimensions. If the "Dimension Name" or "Dimension Item" values are not found in the system, it will create new ones.
While importing a voucher, several attachments can be included. The attachments need to be base64 encoded and included in the XML message. API doesn't check the size of the attachments, but the maximum size of attachments is 2GB.
Request:
Level | Element name | Type and length | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | voucher | Aggr. | 1 | ||
2 | calculationmode | Text | 1 | net (vat lines are not calculated automatically) or gross (vat lines are calculated automatically) | net |
2 | voucherdate | Date | 1 | Date of the voucher | 2013-10-20 |
Attr. | format | Text | 1 | Date format, always ansi | ansi |
2 | number | Numeric | 0...1 | Number of voucher. If not given, system automatically picks next number | 42 |
2 | description | Text, max. 255 | 0...1 | Description of the voucher | |
2 | voucherclass | Text | 1 | Myyntilasku, Myyntisuoritus, Pankki, Kassa, Tuodut tapahtumat, Automaattiset tilinpäätöskirjaukset, Järjestelmän muodostamat, Ostolasku, Ostosuoritus or Muut | Myyntilasku |
2 | checked | Text | 0...1 | Defines whether imported voucher rises to unchecked postings view. True or false. False by default. | false |
2 | voucherline | Aggr. | 0...n | ||
3 | linesum | Numeric | 1 | Negative value is recorded to credit side and positive value on debit side. Two decimal maximum. | -100,00 |
Attr. | type | Text | 0...1 | net or gross | net |
3 | description | Text, max. 255 | 0...1 | Description text | |
3 | accountnumber | Numeric | 1 | Accounting account number, must be found or an error is returned | 1701 |
3 | vatpercent | Numeric | 1 | Must not be in conflict with vatcode attribute | 24 |
Attr. | vatcode | Text | 0...1 | If not given, value behind account number is used. Allowed VAT-classes are listed here. | KOMY |
3 | accountdimension | Text | 0...1 | Voucher's follow-up object. | Seurantakohde 1 |
Attr. | type | Text | 1 | name or netvisorkey (shown only in Netvisor) | name |
3 | dimension | Aggr. | 0...n | ||
4 | dimensionname | Text | 1 | Dimension name. If dimension is not found from system, it is created | Project 1 |
4 | dimensionitem | Text | 1 | Dimension. If item in dimension is not found from system, it is created | Payroll |
2 | voucherattachments | Aggr. | 0...1 | ||
3 | voucherattachment | Aggr. | 1...n | ||
4 | mimetype | Text | 1 | MIME-type of the attachment | application/pdf |
4 | attachmentdescription | Text, max 100 characters | 1 | Description text for the attachment | Example attachment |
4 | filename | Text, max 255 character | 1 | File name of the attachment | Attachment.pdf |
4 | documentdata | Base64 | 1 | Data of the attachment as base64 encoded string |
Did you find it helpful? Yes No
Send feedback