Resource: accounting.nv
HTTP-method: POST
A transaction fee (e-scan charge) is applied for importing voucher attachments via the interface.
Vouchers, voucher lines, the lines' cost objects, 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 number information is not given, the system automatically assigns the next number sequentially from the selected voucher type.
System-created voucher types:
- Sales invoice (ML)
- Sales transaction (MS)
- Bank (PT)
- Treasury (KT)
- Imported transactions (PUMP)
- Automatic financial statements (T)
- Vouchers formed by the system (AT)
- Others (MU)
- Purchase invoice (OL)
- Purchase transaction (OS)
- Accruals (JK)
- Pay (PA)
Voucher type must be provided with the full name, not the abbreviation. Users can manually add new voucher types to the system.
Voucher line's sum's type - net or gross - is chosen for each voucher. If the calculation type is net, the system will not automatically calculate VAT lines and rounding difference lines at the end of the voucher, and the voucher will be exactly as the imported material. In gross calculation, VAT lines and rounding difference lines are always automatically calculated by the system.
The account chosen for the voucher line 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. See the list of allowed VAT codes here.
Voucher must always be imported with both debit and credit sides. Positive row sum is recorded as debit and negative as credit. If the debit and credit entries do not match, the difference is automatically recorded in rounding differences if the calculation type is gross. In net calculation, the interface respects the imported data, so the voucher's debit and credit entries may not necessarily match. The request message must ensure that the voucher is created according to bookkeeping regulations.
One voucher line can relate to several cost objects. If the given cost object header or object information is not found in the system, the interface creates them as new.
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.
The details of the imported material are sent with the request as XML (POST-data) according to the following description:
Level | Element name | Type and length | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | voucher | Aggr. | 1 | ||
2 | calculationmode | Text | 1 | Calculation mode of the voucher. Are the voucher lines handled with net (net) or gross (gross) handling. In net handling, the system does not automatically calculate vat and rounding difference lines | net |
2 | voucherdate | Date | 1 | Date of the voucher | 2023-03-1 |
Attr. | format | Text | 1 | Date format, always ansi | ansi |
2 | number | Numeric, max. 9 | 0...1 | Voucher number. If not given, system automatically picks next number from the selected voucher type | 1 |
2 | description | Text | 0...1 | Description of the voucher. Maximum length of the field is 255 characters. |
Description |
2 | voucherclass | Text | 1 | Voucher type. See possible voucher types above (Netvisor can also create custom voucher types). | Sales invoice |
2 | checked | Text | 0...1 | Defines whether imported voucher rises to unchecked postings view. True or false, default is false. | false |
2 | comment | Text, max 255 | 0...1 | Comment of the voucher, visible in the voucher's processing history | Comment to processing history |
2 | voucherline | Aggr. | 0...n | ||
3 | linesum | Numeric | 1 | Row sum, negative is recorded to credit side and positive to debit side. Sum is handled with two decimal precision. | -100,00 |
Attr. | type | Text | 0...1 | Type of the sum, net (vat-free) gross (vat-included) | net |
3 | description | Text | 0...1 | Description of the voucher line. Maximum length of the field is 255 characters. | Description text |
3 | accountnumber | Numeric | 1 | Accounting account number (must be found in the system) | 1701 |
3 | vatpercent | Numeric | 1 | VAT percentage, must not be in conflict with the selected vat code | 24 |
Attr. | vatcode | Text | 0...1 | VAT code, if not given, it is retrieved from the account number. If given, it is always used. VAT codes and identifiers are listed here. Also see Handling of VAT and VAT identifiers | KOMY |
3 | accountdimension | Text | 0...1 | Voucher's follow-up object | Follow-up object 1 |
Attr. | type | Text | 1 | Type of the follow-up object, netvisorkey or name If value "netvisorkey" is given, the element must provide the follow-up object's ID. ID cannot be retrieved via the interface, but it is visible in Netvisor. If value "name" is given, the element must provide the follow-up object's name. The follow-up object is identified based on the name from all follow-up object names. The follow-up object must already exist in Netvisor. |
name |
3 | dimension | Aggr. | 0...n | ||
4 | dimensionname | Text, max. 50 | 1 | Cost object header If the header is not found in the system, the interface creates it |
Project 1 |
4 | dimensionitem | Text, max. 200 | 1 | Cost object If the object is not found in the system, the interface creates it |
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 | 1 | Description | |
4 | filename | Text, max. 255 | 1 | File name of the attachment | Description.pdf |
4 | documentdata | Text | 1 | Attachment file as base64 encoded |
Did you find it helpful? Yes No
Send feedback