Resource: purchaseinvoice.nv
HTTP-method: POST
An e-invoice transaction payment will be charged for each purchase invoice imported to Netvisor via API.
Attachments can also be imported for purchase invoice. Purchase invoice attachments have to be in PDF-format.
InvoiceSource must be finvoice to import an attachment.
During the import vendor card is created if vendor is missing from Netvisor. When importing, the vendor is focused to existing vendor by following rules:
- Focus on existing vendor if account number and name matches with the invoice and VAT number is the same as on invoice
- Focus on existing vendor if account number matches with the invoice and VAT number is the same as on invoice
- Focus on existing vendor if account number and name matches with the invoice
- Focus on existing vendor if name matches with the invoice and VAT number is the same as on invoice
- Focus on existing vendor if account number matches with the invoice and VAT number is empty
- Focus on existing vendor if account number matches with the invoice
- Focus on existing vendor if VAT number is the same as on invoice
- Focus on existing vendor if name matches with the invoice
If non of the above applies, new vendor is created.
Request:
Level | Element name | Type and length | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | purchaseinvoice | Aggr. | 1 | ||
2 | invoicenumber | String | 1 | Number of the invoice | 12345 |
2 | invoicedate | Date | 1 | Date of the invoice | 2014-03-03 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
Attr. | findopendate | String | 0...1 | Only true is accepted | true |
2 | invoicesource | String | 0...1 | Can be manual or finvoice, must be finvoice in order to import attachments. When using finvoice there is approx one (1) minute delay in importing the invoice to Netvisor because the invoice is processed using Finvoice handler. | finvoice |
2 | valuedate | Date | 0...1 | Currently this is needed in order to import purchase invoices in despite of being marked optional in DTD | 2014-03-03 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
2 | eventdate | Date | 0...1 | Event date for purchase invoice voucer | 2014-03-31 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
2 | duedate | Date | 1 | Due date of the invoice | 2014-03-17 |
Attr. | format | String | 1 | Date format, always ansi | |
2 | purchaseinvoiceonround | String | 0...1 | Defines the status of PurchaseInvoice. Can be open, approved or accepted | open |
Attr. | type | String | 1 | Type of status, default netvisor | netvisor |
2 | vendorname | String, max 250 | 0...1 | Name of the vendor | My Vendor |
2 | vendoraddressline | String, max 80 | 0...1 | Address of the vendor | |
2 | vendorpostnumber | String, max 50 | 0...1 | Post number of the vendor | |
2 | vendorcity | String, max 50 | 0...1 | City of the vendor | |
2 | vendorcountry | String, max 50 | 0...1 | Country code of the vendor | FI |
2 | vendorphonenumber | String, max 80 | 0...1 | Vendor's phone number | |
2 | vendorfaxnumber | String, max 80 | 0...1 | Vendor's fax number | |
2 | vendoremail | String, max 80 | 0...1 | Vendor's E-mail address | |
2 | vendorhomepage | String, max 80 | 0...1 | Vendor homepage | |
2 | amount | Numeric | 1 | Total of the invoice, this will be approximated to 2 decimals | 100,00 |
2 | accountnumber | String | 0...1 | Account number | FI1000111234567 |
2 | organizationindentifier | String | 0...1 | Organiztion identifier | 123456-7 |
2 | deliverydate | Date | 0...1 | Invoice delivery date | 2014-03-03 |
Attr. | format | String | 1 | Date format, always ansi | |
2 | overduefinepercent | Numeric | 0...1 | overduefine percent | |
2 | bankreferencenumber | String, max 70 | 0...1 | Bank reference or purchase order message | 1234567 |
2 | ourreference | String, max 200 | 0...1 | Our reference | |
2 | yourreference | String, max 200 | 0...1 | Your reference | |
2 | currencycode | String | 0...1 | Currency, currencycode and accountnumber must be given in order to have the exchange calculation done correctly | GBP |
2 | deliveryterms | String, max 255 | 0...1 | Terms of delivery | |
2 | deliverymethod | String, max 255 | 0...1 | Method of delivery | |
2 | comment | String, max 255 | 0...1 | Comment | |
2 | checksum | String | 0...1 | Checksum | |
2 | pdfextrapages | Numeric | 0...1 | ||
2 | readyforaccounting | Numeric | 0...1 | If given ( and invoices status is approved/accepted ), interface will approve / accept it and form a voucher for accounting | 1 |
2 | primaryvendormatchtype | String | 0...1 | Possible to force vendormatch by value: - code - name - bankaccountnumber - organizationid If no vendor found with the given value, then default procedure is followed | code |
2 | purchaseinvoicelines | Aggr. | 1 | ||
3 | purchaseinvoiceline | Aggr. | 1...n | ||
4 | productcode | String, max 50 | 0...1 | Product code | 340 |
4 | productname | String, max 200 | 1 | Name of the product | Test Product |
4 | orderedamount | Numeric | 0...1 | Amount ordered | 12 |
4 | deliveredamount | Numeric | 1 | Amount delivered | 12 |
4 | unitname | String | 0...1 | Unit of measurement | |
4 | unitprice | Numeric | 1 | Price of a single unit with tax | 3,81 |
4 | discountpercentage | Numeric | 0...1 | Discount percentage | 1,52 |
4 | vatpercent | Numeric | 1 | VAT percentage | 24 |
4 | linesum | Numeric | 1 | Total of the line, this will be approximated to 2 decimals | 45,72 |
Attr. | type | String | 1 | Type of sum, default is brutto (gross) | brutto |
4 | description | String, max 200 | 0...1 | Description text | |
4 | sort | Numeric | 0...1 | ||
4 | accountingsuggestion | Numeric | 0...1 | If not given, default from company's default accounts will be used (based on vendor's country code) | 4000 |
4 | dimension | Aggr. | 0...n | ||
5 | dimensionname | String, max 50 | 1 | Dimension header | Project |
5 | dimensionitem | String, max 200 | 1 | Dimension name | 8890 |
2 | purchaseinvoicecommentlines | Aggr. | 0...1 | ||
3 | purchaseinvoicecommentline | Aggr. | 1...n | ||
4 | comment | String | 1 | Comment text | |
4 | sort | String | 0...1 | ||
2 | purchaseinvoiceattachments | Aggr. | 0...1 |
| |
3 | purchaseinvoiceattachment | Aggr. | 1...n | Only PDF-format supported. Attachmnet is handled as a picture of the invoice. | |
4 | mimetype | String | 1 | MIME-type of the attachment | |
4 | attachmentdescription | String | 1 | Description of the attachment | Max 100 character |
4 | filename | String | 1 | The name of attached file | |
4 | documentdata | String | 1 | In Base64 format | |
Attr. | documenttype | String | 0...1 | Type of the document. invoiceimage or otherattachment. Default is invoiceimage. | invoiceimage |
Did you find it helpful? Yes No
Send feedback