Skip to main content

Import purchase invoice purchaseinvoice.nv

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:

  1. Focus on existing vendor if account number and name matches with the invoice and VAT number is the same as on invoice

  2. Focus on existing vendor if account number matches with the invoice and VAT number is the same as on invoice

  3. Focus on existing vendor if account number and name matches with the invoice

  4. Focus on existing vendor if name matches with the invoice and VAT number is the same as on invoice

  5. Focus on existing vendor if account number matches with the invoice and VAT number is empty

  6. Focus on existing vendor if account number matches with the invoice

  7. Focus on existing vendor if VAT number is the same as on invoice

  8. 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
- 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)

gross

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

5

dimensionitemcode

String

0...1

Dimension code (when given, dimensionitem is not used)

1234

5

dimensionitemname

String

0...1

Dimension item name (when given, dimensionitem is not used)

Item Name 1

2

purchaseinvoicesublines

Aggr.

0...1



3

purchaseinvoicesubline

Aggr.

1...n



4

productcode

String

0...1

Product code


4

productname

String

0...1

Product name


4

orderedamount

Numeric

0...1

Amount ordered


4

deliveredamount

Numeric

0...1

Amount delivered


4

unitname

String

0...1

Unit of measurement. Not visible in Netvisor on purchase invoice.


4

unitprice

Numeric

0...1

Price of a single unit with tax


4

discountpercentage

Numeric

0...1

Discount percentage


4

vatpercent

Numeric

0...1

VAT percentage


4

linesum

Numeric

0...1

Line sum. Approximated to 2 decimals.


Attr.

type

String

1

Always gross (brutto)

gross

4

description

String

0...1

Description text


4

sort

Numeric

0...1

Imported line sort number

1

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

2

purchaseinvoicerelatedpurchaseordernumbers

Aggr.

0...1



3

purchaseinvoicerelatedpurchaseordernumber

Aggr.

1...n



4

purchaseordernumber

String

1

Purchase order number linked to the purchase invoice


2

partialpaymentdetails

Aggr.

0...n



3

paidamount

Numeric

1

Amount of the payment linked to the invoice


Attr.

amountcurrencyidentifier

String

1

Payment currency

EUR

Did this answer your question?