An e-invoice transaction payment will be charged for each purchase invoice imported to Netvisor via API.
Purchase invoice resources have been developed for internal use and therefore purchase invoice resources don't support all related actions. They were published though as they will work as-is in many integrations. Known issues:
- Attachment import is not (fully) supported (you can bring one attachment, which is handled as a picture of an invoice)
- Vendors are not updated automatically by purchase invoice XML
Integration | HTTP-method | Resource | DTD | Schema | Example |
Get purchase invoice list | GET | purchaseinvoicelist.nv | Download | ||
Get purchase invoice | GET | getpurchaseinvoice.nv | Download | ||
Get purchase invoice attachments | GET | getattachments.nv | - | ||
Deleted purchase invoices | GET | deletedpurchaseinvoices.nv | |||
Import purchase invoice | POST | purchaseinvoice.nv | purchaseinvoice.dtd | Download | |
Update invoice status and post purchase invoice | POST | purchaseinvoicepostingdata.nv | purchaseinvoicepostingdata.dtd | Download | |
Import purchace invoice circulation | POST | purchaseinvoicecirculation.nv | purchaseinvoicecirculation.xsd | Download | |
Get circulation lists | GET | getcirculationlists.nv | |||
Import purchase invoice accrual | POST | purhaseinvoiceaccrual.nv | purchaseinvoiceaccrual.xsd | Download | |
Import vendor | POST | vendor.nv | vendor.xsd | Download | |
Get vendor | GET | getvendor.nv |
Get purchase invoice list
Resource: purchaseinvoicelist.nv
Querystring parameters:
Parameter name | Occurs | Description | Example |
begininvoicedate | 0...1 | Invoice date lower limit | 2018-09-20 |
endinvoicedate | 0...1 | Invoice date upper limit | 2018-09-30 |
invoicenumber | 0...1 | Invoice number to get | 1001 |
invoicestatus | 0...1 | Invoice status: open, approved or accepted | open |
lastmodifiedstart | 0...1 | Finds invoices that are modified after given date | 2018-09-15 |
lastmodifiedend | 0...1 | Finds invoices that are modified before given date | 2018-09-15 |
purchaseinvoicebatchid | 0...1 | Finds invoices which were imported with the given batch ID. See purchase invoice batch handling | 123 |
paymentstatus | 0...1 | Finds invoices which payment status is unpaid or paid | unpaid |
Response:
Level | Element Name | Type and length | Occurs | Description | Example |
root | Root | Aggr. | 1 | ||
1 | PurchaseInvoiceList | Aggr. | 1 | ||
2 | PurchaseInvoice | Aggr. | 0...n | ||
3 | NetvisorKey | Numeric | 1 | Invoice identifier in Netvisor | 123 |
3 | InvoiceNumber | Text | 1 | Invoice number | 345 |
3 | InvoiceDate | DateTime | 1 | Invoice date | 2013-10-23 |
Attr. | format | String | 1 | Format of InvoiceDate, Always ansi | ansi |
3 | Vendor | String | 1 | Name of the vendor | Vendor Oy Ab |
3 | VendorOrganizationIdentifier | Numeric | 1 | Business ID (Y-tunnus) | 1234567-8 |
3 | Sum | Numeric | 1 | Invoice total sum | 100,00 |
3 | Payments | Numeric | 1 | Invoice payments sum | 30,50 |
3 | OpenSum | Numeric | 1 | Open sum of invoice | 69,50 |
3 | Uri | String | 1 | Url that can be used to get details of invoice | /getpurchaseinvoice.nv?netvisorkey=123 |
Get purchase invoice
Resource: getpurchaseinvoice.nv
Get detailed information of a specific purchase invoice.
Querystring parameters:
Parameter name | Occurs | Description | Example |
netvisorkey | 1 | Netvisor key of the invoice to retrieve. | 1 |
netvisorkeylist | 0...1 | Can be used to get the details of several invoices with given id. Max. 500 identifiers. | 1,2,3 |
version | 0...1 | Used for returning single invoice line's dimension details inside the element (PurchaseInvoiceLine) 1 = Dimensions outside of the invoice line, used as default or if parameter not given 2 = Dimensions inside the invoice line | 2 |
include | 0...1 | - actions = What can be done to the invoice (approve, accept, reject, pay) - handlinghistory = Invoice's handling history - previewimage = Invoice's previewimage | actions |
omitattachments | 0...1 | True = Exclude attachments False = Include attachments If parameter not given = False | false |
Response:
Level | Element Name | Type and length | Occurs | Description | Example |
Root | Root | Aggr. | 1 | ||
1 | PurchaseInvoice | Aggr. | 1 | ||
2 | PurhaseInvoiceNetvisorKey | String | 1 | Invoice Netvisor ID | 1025 |
2 | PurchaseInvoiceNumber | String | 1 | Invoice number | 345 |
2 | PurchaseInvoiceDate | Date | 1 | Invoide date | 2013-10-23 |
Attr. | format | String | 1 | Format of InvoiceDate, Always ansi | ansi |
2 | PurchaseInvoiceDeliveryDate | Date | 1 | Delivery date | 2013-09-10 |
Attr. | format | String | 1 | Format of DeliveryDate, Always ansi | ansi |
2 | PurchaseInvoiceDueDate | Date | 1 | Due date | 2014-01-09 |
Attr. | format | String | 1 | Format of DueDate, Always ansi | ansi |
2 | PurchaseInvoiceValueDate | Date | 1 | Value date | 2013-12-03 |
Attr. | format | String | 1 | Format of ValueDate, Always ansi | ansi |
2 | PurchaseInvoiceReferencenumber | String | 1 | Reference number of invoice | 1234 |
2 | PurchaseInvoiceVendorBankAccountNumber | String | 1 | Vendor bank account number | |
2 | IsPurchaseInvoiceVendorBankAccountDeleted | String | 1 | True or False. Is the bank account deleted | False |
2 | IsPurchaseInvoiceVendorBankAccountFromSEPARegion | String | 1 | True tai False. Is the bank account in SEPA region | True |
2 | PurchaseInvoiceAmount | Numeric | 1 | Amount in two decimal accuracy | 1234,56 |
2 | PurchaseInvoicePaidAmount | Numeric | 1 | Paid amount in two decimal accuracy | 1000,00 |
2 | ForeignCurrencyAmount | Numeric | 1 | Amoun in foreign currency in two decimal accuracy | 1234,56 |
2 | ForeignCurrencyNameID | String | 1 | Currency code | EUR |
2 | InvoiceStatus | String | 1 | Status of the invoice Note: Currently always returns 'open', incomplete functionality | open |
2 | ApprovalStatus | String | 1 | Purhase invoice's approval status: new invoice=open in factual verification=infactualverification approved=approved rejected=acceptrorrejected | approved |
2 | PurchaseInvoiceOurReference | String | 1 | Our reference | |
2 | PurchaseInvoiceYourReference | String | 1 | Your reference | |
2 | PurchaseInvoiceDescription | String | 1 | Invoice description | |
2 | VendorNetvisorKey | Numeric | 1 | Vendor's Netvisor Key | 123 |
2 | VendorOrganizationIdentifier | String | 1 | Vendor's Business ID (y-tunnus) | 1234567-8 |
2 | VendorCode | String | 1 | Vendor's Code | 23 |
2 | VendorName | String | 1 | Name of the vendor | Vendor Inc |
2 | VendorAddressLine | String | 1 | Address of the vendor | Pajukuja 5 |
2 | VendorPostNumber | String | 1 | Vendor post number | 53100 |
2 | VendorTown | String | 1 | Vendor city | Lappeenranta |
2 | VendorCountry | String | 1 | County code of the Vendor | FI |
2 | Fingerprint | String | 1 | Invoice finger print | 606F6527D9CAF4BB7B69E4D616FAA78637552960A810FD3B5CC04BFEB6757D4C |
2 | VoucherID | Numeric | 0...1 | Voucher's NetvisorKey | 1235 |
2 | IsAccounted | String | 1 | Is invoice accounted | True |
2 | PreviewImage | String | 0...n | When action parameter in use | |
2 | Attachments | Aggr. | 0...1 | ||
3 | Attachment | Aggr. | 1...n | ||
4 | AttachmentBase64Data | Base64 | 1 | Base64 encoded data of the attachment | |
4 | FileName | String | 1 | File name of the attachment | Invoice1234.pdf |
4 | ContentType | String | 1 | MIME-type of attachment content | Appication/pdf |
4 | Comment | String | 1 | Comment text | |
2 | InvoiceLines | Aggr. | 0...1 | ||
3 | PurchaseInvoiceLine | Aggr. | 1...n | ||
4 | NetvisorKey | String | 1 | Netvisor key | |
4 | LineSum | Numeric | 1 | Sum of the line | |
4 | LineNetSum | Numeric | 1 | Net sum of the line | |
4 | UnitPrice | Numeric | 1 | Price of a single unit (gross) | |
4 | VatPercent | Numeric | 1 | VAT percent | |
4 | VatCode | String | 1 | VAT code | |
4 | Description | String | 1 | Description text | |
4 | Unit | String | 1 | Unit of measurement | |
4 | OrderedAmount | Numeric | 1 | Amount of product ordered | |
4 | PurchasePrice | Numeric | 1 | Outdated element, returns nothing | |
4 | DeliveredAmount | Numeric | 1 | Amount of units delivered | |
4 | ProductCode | String | 1 | Product identifier | |
4 | DiscountPercentage | Numeric | 1 | Discount percentage | |
4 | ProductName | String | 1 | Name of the product | |
4 | AccountingSuggestionBookkeepingaccountNetvisorKey | String | 0...1 | Account suggestions Nevisorkey | |
4 | AccountingSuggestionBookkeepingAccount | String | 0...1 | Account suggestion | |
4 | PurchaseInvoiceLineDimensions | Aggr. | 0...1 | Levels 4 -5 -6 when version parameter is 2. In other case levels 3-4-5 | |
5 | Dimension | Aggr. | 1...n | ||
6 | DimensionName | String | 1 | Dimension | Project |
6 | DimensionNameNetvisorKey | String | 1 | Dimension Netvisor ID | 2 |
6 | DimensionDetailName | String | 1 | Name of the dimension | Project 1 |
6 | DimensionDetailNameNetvisorKey | String | 1 | Dimension name Netvisor ID | |
2 | LinkedPurchaseOrders | Aggr. | 0...1 | If purchaseoders have been linked to a purchase invoice, returns their number and ID | |
3 | PurchaseOrder | Aggr. | 1...n | ||
4 | OrderNumber | Numeric | 1 | Number of purchase order | 123 |
4 | NetvisorKey | Numeric | 0...1 | NetvisorID of purchase order Note! If the number of purchase order has been added to purchase invoice in advance, the purchase order might not be in Netvisor | 10 |
When parameter actions is in use the following structure is added at the end of the message:
Level | Element | Type and length | Occurs | Description | Example |
2 | PostingLinesAccess | Aggr. | 1 | Purchase invoice accounting | |
3 | CanEditPostingLines | String | 1 | True or False | True |
3 | CanUserPostInvoice | String | 1 | True or False | False |
3 | SuggestPostingByDefault | String | 1 | True or False | True |
3 | CanEditAccountingSuggestion | String | 1 | True or False | False |
2 | Actions | Aggr. | 1 | What can be done to the purchase invoice with the user's rights | |
3 | Action | Aggr. | 1...n | ||
4 | Id | String | 1 | Possible values: approved accepted rejected pay | accepted |
4 | Type | String | 1 | Returns the resouce that can be used to deliver the action | purchaseinvoicepostingdata |
4 | Description | String | 1 | Explanation of the action | Accept the purchase invoice |
2 | Alerts | Aggr. | 1 | If there are no alerts, only upper level tag is shown | |
3 | Alert | Aggr. | 1 | ||
4 | Heading | String | 1 | Header | The invoice is in a locked period |
4 | Description | String | 1 | Explanation | Accepting the purchase invoice does not update any information because the invoice is in a locked period |
2 | Notifications | Aggr. | 1 | If there are no notifications, only upper level tag is shown | |
3 | Notofication | Aggr. | 1 | ||
4 | Heading | String | 1 | Header | |
4 | Description | String | 1 | Explanation | Vendor's bank account has been deleted, update bank account |
When parameter handlinghistory is in use the following structure is added at the end of the message:
Level | Element | Type and length | Occurs | Description | Example |
2 | HandlingHistory | Aggr. | 1 | Purchase invoice handling history | |
3 | HandlingHistoryLine | Aggr. | 1...n | ||
4 | Type | String | 1 | Event | InvoiceCreated |
4 | Heading | String | 1 | Header | Created |
4 | Description | String | 1 | Explanation | Invoice created in the system |
4 | Timestamp | Date | 1 | Timestamp | 2018-01-01 09:45:49:000 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
4 | UserName | String | 1 | Name of the user who performed the action | Eric Example |
4 | UserEmail | String | 1 | Email of the user in the compayn if it is defined and the user is not "System" | eric.example@company.com.test |
4 | UpdatedInformationFields | Aggr. | 0...n | Updated information | |
5 | FieldName | String | 1 | Infomation | Accounted |
5 | OldValue | String | 1 | Old value | No |
5 | NewValue | String | 1 | New value | Yes |
Get purchase invoice attachments
Resource: getattachments.nv
Returns purchase invoice attachments.
Also returns purchase invoice's finvoice-style attachment as an image.
Parameter | Occurs | Description | Example |
attachmentsource | 1 | Always purchaseinvoice | purchaseinvoice |
netvisorkey | 1 | Netvisor ID of the purchase invoice | 123 |
convertpdfstoimages | 0...1 | With value true pdf attachments are converted to png images. Every pdf page as their own image. | true |
Response:
Level | Element | Type | Occurs | Description | Example |
root | Root | Aggr. | 1 | ||
1 | Attachments | Aggr. | 1 | ||
2 | Attachment | Aggr. | 1...n | ||
3 | AttachmentNetvisorKey | Numeric | 1 | Netvisor ID of attachment | 123 |
3 | AttachmentPageNumber | Numeric | 1 | Page number | 1 |
3 | FileName | String | 1 | Date of invoice | Testimage.jpg |
3 | FileType | String | 1 | image/png | |
3 | Content | String | 1 | Base64 encoded file | iVBORw0KGgoAAAANSUhEUgAAB |
Deleted purchase invoices
Resource: deletedpurchaseinvoices.nv
Retrieves purchase invoices that have been deleted since the given date. Purchase invoices can be retrieved up to 7 days from the given date.
Querystring parameters:
Parameter | Occurs | Description | Example |
deletedsince | 1 | Mandatory parameter. Retrieves events that have been deleted since the given date. | 2022-06-08 |
Response:
Level | Element | Type | Occurs | Description | Example |
root | root | Aggr. | 1 | ||
1 | DeletedPurchaseInvoices | Aggr. | 1 | ||
2 | DeletedPurchaseInvoice | Aggr. | 0...n | ||
3 | NetvisorKey | Numeric | 1 | Netvisor ID of purchase invoice | 5 |
3 | DeleteDate | Date | 1 | Delete date | 2022-06-08 15:14 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
Import purchase invoice
Resource: purchaseinvoice.nv
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 | |
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 |
Update invoice status and post purchase invoice
Resource: purchaseinvoicepostingdata.nv
The resource can be used for rejecting, verifying, or approving a purchase invoice as well as for posting. When importing, you can also edit posting lines.
When using this resource, Netvisor user rights of the owner of the used api user keys are checked. This user needs rights to post/verify/approve purchase invoices.
The purchase invoice that you want to verify, accept, or reject must be in state 'open'. The row data are the same as in importing purchase invoice (purchaseinvoice.nv), the row data that is imported replaces the row data on the purchase invoice in Netvisor. Sums in row data must match the purchase invoice amount, otherwise import will end up to error.
A purchase invoice can be posted without changing invoice status when element IsReadyForAccounting is given with value 1 and leaving out the Status element Depending on the status of the purchase invoice, either this pre-posts or posts the invoice, such as in the Netvisor user interface.
Level | Element | Type and length | Occurs | Description | Example |
root | Root | Aggr. | 1 | ||
1 | PurchaseInvoicePostingData | Aggr. | 1 | ||
2 | PurchaseInvoiceNetvisorKey | Numeric | 1 | Netvisor ID of purchase invoice | 31646 |
2 | Status | String | 1 | Purchase invoice status, in that order they can be given: contentsupervisorrejected (hylätty asiatarkastuksessa) approved (asiatarkastettu) acceptrrejected (hylätty hyväksynnässä) accepted (hyväksytty) Invoice status cannot be update to a previous state | approved |
2 | EventDate | Date | 0...1 | Event date | 2019-01-15 |
Attr. | format | String | 1 | Event date format, always ansi | ansi |
2 | IsReadyForAccounting | Numeric | 1 | If value 1 is given Netvisor will generate voucher automatically. If value is not given posting will be done manually in Netvisor. | 1 |
2 | Comment | String, max 3000 | 0...1 | Comment of purchase invoice | Example comment |
3 | PurchaseInvoicePostingLine | Aggr. | 0...n | ||
4 | purchaseinvoicelinenetvisorkey | Numeric | 0...1 | Purchase invoice row NetvisorID | 12345 |
4 | ProductCode | String | 0...1 | Product code | 123 |
4 | ProductName | String | 1 | Product name Can be left out by giving but it will overwrite the possible existing text in Netvisor. | Example product |
4 | OrderedAmount | Numeric | 0...1 | Number of ordered products | |
4 | DeliveredAmount | Numeric | 1 | Number of delivered products | |
4 | UnitName | String | 0...1 | Unit of measure | kpl |
4 | UnitPrice | Numeric | 1 | Unit price | |
4 | DiscountPercentage | Numeric | 0...1 | Discount percentage | |
4 | VatPercent | Numeric | 1 | VAT percent | |
Attr. | vatcode | String | 1 | VAT code | |
4 | LineSum | Numeric | 1 | Will be rounded to two decimals | |
A | type | String | 1 | Only gross (brutto) | gross |
4 | Description | String | 0...1 | Description | |
4 | Sort | Numeric | 0...1 | Row running number | 1 |
4 | AccountingSuggestion | Numeric | 0...1 | Accounting suggestion If not given, default accounts in Netvisor will be used | |
4 | Dimension | Aggr. | 0...n | ||
5 | DimensionName | String, max 200 | 1 | Dimension header | |
5 | DimensionItem | String, max 200 | 1 | Dimension name |
Import purchase invoice circulation
Resource: purchaseinvoicecirculation.nv
Resource can be used for setting, editing or deleting purchase invoice circulation.
The identification of circulation users is done using email address. If the user has an email address saved in Netvisor's User settings Company-specific exceptions, this email address is used. Users email address has to be unique in the company.
The user set for circulation has to have sufficient Accounts receivable and accounts payable rights in Netvisor to factually verify and/or accept purchase invoices. In addition there shouldn't be a vendor or sum limit that prevents circulation. Note! The API user must have a right for setting purchase invoice's approval circulation in Accounts receivable and accounts payable rights in Netvisor.
The resource can be used to set multiple circulations at the same time in one message. If API responds with "OK", the circulation for all purchase invoices has been set. If API responds with an error, importing purchase invoice circulation failed for all invoices in the same message. ValidDataIdentifier-element is returned for those purchase invoices where importing purchase invoice circulation would have been successfull without the error.
Deleting purchase invoice circulation is done by not importing factual verificators and approver for the invoice.
The last imported factual verficator will be set as invoice's main factual verificator.
If the purchase invoice already has circulation and a user has accepted or factually verified the invoice, the circulation can not be edited via API.
The following describes the XML message to import (POST) purchase invoice circulation into Netvisor:
Level | Element | Format | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | purchaseinvoicecirculations | Aggr. | 1 | ||
2 | purchaseinvoicecirculation | Aggr. | 1 | Circulation for one purchase invoice | |
3 | invoiceidentifier | Aggr. | 1 | Purchase invoice identifier, NetvisorID or invoice number | |
4 | netvisorkey | Numeric | 0...1 | Purchase invoice NetvisorID | 123 |
4 | invoicenumber | Numeric | 0...1 | Purchase invoice number | 123 |
3 | circulationlistidentifier | Aggr. | 0...n | Circulation list identifier. If circulation list is set, the user (factual verificator and/or approver) cannot be imported and vice versa. | |
4 | netvisorkey | Numeric | 1 | Circulation list identifier | 10 |
3 | factualverificator | Aggr. | 0...n | Factural verificators | |
4 | String | 1 | Email address | verificator@company.com | |
3 | approver | Aggr. | 0...1 | Purchase invoice approver | |
4 | String | 1 | Email address | approver@company.com | |
3 | comment | String, max 250 | 0...1 | Comment for handling history | Verificators and approver set by integration X. |
Get circulation lists
Resource: getcirculationlists.nv
Fetch company's circulation lists. The identifier (NetvisorKey) is needed when setting circulation list to the purchase invoice using resource purchaseinvoicecirculation.nv. This resource return all circulation lists and parameters are not available.
Response:
Level | Element | Format | Occurs | Description | Example |
root | root | Aggr. | 1 | ||
1 | CirculationLists | Aggr. | 1 | ||
2 | CirculationList | Aggr. | 0..n | ||
3 | NetvisorKey | Numeric | 1 | Circulation list's identifier | 10 |
3 | Name | String | 1 | Name of the circulation list | Summer ciruclation list |
3 | IsDefault | Boolean | 1 | Is circulation list default, true or false | true |
3 | IsForced | Boolean | 1 | Is factual verifier circulation forced, true or false | false |
3 | LastEditTimeStamp | Date | 0..1 | Latest editing time | 2023-05-02T09:30:59.247 |
3 | Verifiers | Aggr. | 0..1 | ||
4 | FactualVerifier | Aggr. | 0..n | ||
5 | Name | String | 1 | Factual verifier's name | Axel FactualVerifier |
5 | Order | Numeric | 0..1 | Verifier's order, if circulation is forced | 1 |
5 | IsMainFactualVerifier | Boolean | 0..1 | Is main factual verifier. The element is returned in the response only if the value is true | true |
4 | Approver | Aggr. | 0..1 | ||
5 | Name | String | 1 | Name of the approver | Anna Approver |
Import purchase invoice accrual
Resource: purchaseinvoiceaccrual.nv
Purchase invoice can be accrued by giving start month and year and end month and year or start month and year or divisioncurve. Accual end time can not be before the start time and start time can be invoice's event month at the earliest. The invoice accrued can't be accounted. The purchase invoice can not be accrued on a locked period.
When using divisioncurve the accrual can have monthly percentage values. When using start month and year and end month and year the accrual is done using even percentage for the given time span. For example 3/2021-4/2021 accrues the invoice rows for March and April with 50%.
The following describes the XML message to import (POST) purchase invoice accrual into Netvisor:
Level | Element | Format | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | purchaseinvoiceaccrual | Aggr. | 1 | Purchase invoice accrual | |
2 | invoiceidentifier | Aggr. | 1 | Purchase invoice identifier, either NetvisorID or invoice number | |
3 | netvisorkey | Numeric | 0...1 | Purchase invoice NetvisorID | 123 |
3 | invoicenumber | String | 0...1 | Purchase invoice number | 123 |
2 | accrualrule | Aggr. | 1 | Accrual rule | |
3 | startmonth | Numeric | 1 | Accrual start month | 3 |
3 | startyear | Numeric | 1 | Accrual start year | 2021 |
3 | divisioncurvename | String, max 250 | 0...1 | Division curve name, has to be unique | Depreciations |
3 | endmonth | Numeric | 0...1 | Accrual end month | 4 |
3 | endyear | Numeric | 0...1 | Accrual end year | 2021 |
Import vendor
Resource: vendor.nv
Add a new vendor or edit existing vendor.
API returns vendor's NetvisorKey. We reccomend to store it somewhere, if you want to get of change verdor information afterwards. For now, the NetvisorKey cannot be obtained via API. Through Netvisor UI NetvisorKey can be obtained when opening the vendor and looking the serch bar, where is id (e.g. id=123).
Parameters:
Parameter | Occurs | Description | Example |
method | 1 | Add Add new vendor Edit Edit existing vendor | |
netvisorkey | 0...1 | Vendor's NetvisorKey Mandatory if method = edit |
XML-message (POST-data):
Level | Element | Type | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | vendor | Aggr. | 1 | ||
2 | vendorbaseinformation | Aggr. | 1 | ||
3 | code | String | 0...1 | Vendor code | 123 |
3 | name | String | 1 | Vendor name | Testitoimittaja |
3 | address | String | 0...1 | Adress | Toimittajakatu 1 |
3 | postcode | String | 0...1 | Postal code | 00100 |
3 | city | String | 0...1 | City | Helsinki |
3 | country | String | 0...1 | County code | FI |
Attr. | type | String | 1 | Type of county code | ISO-3166 |
3 | organizationid | String | 0...1 | Business ID (Y-tunnus) | 123456-7 |
3 | groupname | String | 0...1 | Vendor group | The toimittajat |
3 | vendorbankaccounts | Aggr. | 0...1 | Vendor's bank accounts | |
4 | vendordomesticbankaccounts | Aggr. | 0...1 | ||
5 | vendordomesticbankaccount | Aggr. | 0...8 | Finnish bank accounts | |
6 | netvisorkey | Numeric | 0...1 | Bank account's NetvisorKey | 1 |
6 | iban | String | 1 | Account number (IBAN) | FI7536359370000661 |
6 | bankname | String | 1 | Bank name | Testipankki |
6 | isdefault | String | 0...1 | Use as a default or not | True |
4 | vendorforeignbankaccounts | Aggr. | 0...1 | ||
5 | vendorforeignbankaccount | Aggr. | 0...8 | Foreign bank accounts | |
6 | netvisorkey | Numeric | 0...1 | Bank account's NetvisorKey | 2 |
6 | bban | String | 1 | Account number (IBAN) | GB29NWBK60161331926819 |
6 | bicswift | String | 1 | BIC code | BUKBGB22 |
6 | bankname | String | 1 | Bank name | Barclays |
6 | clearingcode | String | 0...1 | Clearing code | |
6 | clearingnumber | String | 0...1 | Clearing number | |
6 | bankaddresss | String | 0...1 | Bank address | Bank Street 1 |
6 | country | String | 1 | Country code | GB |
Attr. | type | String | 1 | Country code type | ISO-3166 |
6 | currencycode | String | 1 | Currency code | GBP |
At | type | String | 1 | Currency code type | ISO-4217 |
6 | isdefault | String | 0...1 | Use as a default or not | False |
6 | includeaddresssinforeignpayments | String | 0...1 | Add bank's address information to payment message besides BIC code | True |
2 | vendorcontactdetails | Aggr. | 0...1 | Vendor's contact information | |
3 | phonenumber | String | 0...1 | Phone number | +35850123456 |
3 | String | 0...1 | toimittaja@toimittajat.fi | ||
3 | faxnumber | String | 0...1 | Fax | |
3 | contactpersonname | String | 0...1 | Contact person's name | Timo Testaaja |
3 | contactpersonphonenumber | String | 0...1 | Contact person's phone number | +35840987654 |
3 | contactpersonemail | String | 0...1 | Contact person's email | timo.testaaja@toimittajat.fi |
3 | homepage | String | 0...1 | Home page | |
3 | comment | String | 0...1 | Comment | No comments |
2 | vendoradditionalinformation | Aggr. | 0...1 | ||
3 | defaultvatpercent | Numeric | 0...1 | Default VAT percent | 24 |
3 | ispartialvatreduceprivileged | String | 0...1 | Partial VAT reduced priviledged | False |
3 | paymenttermdiscountpercent | Numeric | 0...1 | Discount percentage | |
3 | paymenttermcashdiscountsdays | Numeric | 0...1 | Discount days | |
3 | paymenttermnetdays | Numeric | 0...1 | Default payment term days | |
3 | currencycode | Currency code | 0...1 | Default currency | EUR |
Attr. | type | String | 1 | Currency code type | ISO-4217 |
3 | vendordimensions | Aggr. | 0...1 | Default dimensions | |
4 | dimension | Aggr. | 1 | ||
5 | dimensionname | String | 1 | Dimension name | Projects |
5 | dimensionitem | String | 1 | Dimension item | Project 1 |
3 | vendoraccountingaccounts | Aggr. | 0...1 | Vendor accounting accounts | |
4 | vendoraccountingaccount | Aggr. | 1...n | ||
5 | accountnumber | String | 1 | Account number | 4000 |
5 | isdefault | String | 1 | Use as a default or not | True |
3 | vendoracceptancedetails | Aggr. | 0...1 | Acceptors | |
4 | vendoracceptancedetail | Aggr. | 1...n | ||
5 | acceptancename | String | 0...1 | Acceptor name | Taaki Tarkastaja |
5 | isdefault | String | 0...1 | Use as a default or not | False |
5 | isforced | String | 0...1 |
Get vendor
Resource: getvendor.nv
Returns vendor information. Vendor information can be retrieved using NetvisorKey or alteration timestamp. Vendors NetvisorKeys can be retrieved over the api by using the alteration timestamp (changedsince) parameter.
Through Netvisor UI NetvisorKey can be obtained when opening the vendor and looking the serch bar, where is id (e.g. id=123).
Parameters:
Parameter | Occurs | Description | Example |
netvisorkey | 1 | Netvisor key of the vendor. The root element in the response is "vendor" | 1 |
netvisorkeylist | 0...1 | Can be used to get the details of several vendors with given id. Note that there should be a vendor with all given IDs, otherwise the API will return an error message. The root element in the response is "vendors" if there are several IDs given. | 1,2,3 |
changedsince | 0...1 | Filters result to contain only vendors having change after given date, date in format YYYY-MM-DD or time in format YYYY-MM-DDTHH:MM:SS. The root element in the response is "vendors" if there are several IDs given. If there are no changes vendor details, the content of the vendors element is empty. | |
page | 0...1 | Parameter can be used to get vendors in the groups of 500. Each page must be called in a separate request. Page information is included in the response header information e.g. X-Netvisor-Pagination-Current-Page : 2 X-Netvisor-Pagination-Previous-Page : 1 X-Netvisor-Pagination-Next-Page : 3 X-Netvisor-Pagination-Limit : 100 X-Netvisor-Pagination-Total-Count : 1000
| 2 |
Response:
Level | Element | Type | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | vendor | Aggr. | 1 | The root element in the response is "vendor" or "vendors", see parameter descriptions. | |
2 | NetvisorKey | Numeric | 1 | Vendor's Netvisor Key | 123 |
2 | vendorbaseinformation | Aggr. | 1 | ||
3 | code | String | 0...1 | Vendor code | 123 |
3 | name | String | 1 | Vendor name | Testitoimittaja |
3 | address | String | 0...1 | Address | Toimittajakatu 1 |
3 | postcode | String | 0...1 | Postal code | 00100 |
3 | city | String | 0...1 | City | Helsinki |
3 | country | String | 0...1 | County code | FI |
Attr. | type | String | 1 | Type of county code | ISO-3166 |
3 | organizationid | String | 0...1 | Business ID (Y-tunnus) | 123456-7 |
3 | groupname | String | 0...1 | Vendor group | The toimittajat |
3 | vendorbankaccounts | Aggr. | 0...1 | Vendor's bank accounts | |
4 | vendordomesticbankaccounts | Aggr. | 0...1 | ||
5 | vendordomesticbankaccount | Aggr. | 0...8 | Finnish bank accounts | |
6 | netvisorkey | Numeric | 0...1 | Bank account's NetvisorKey | 1 |
6 | iban | String | 1 | Account number (IBAN) | FI7536359370000661 |
6 | bankname | String | 1 | Bank name | Testipankki |
6 | isdefault | String | 0...1 | Use as a default or not | True |
4 | vendorforeignbankaccounts | Aggr. | 0...1 | ||
5 | vendorforeignbankaccount | Aggr. | 0...8 | Foreign bank accounts | |
6 | netvisorkey | Numeric | 0...1 | Bank account's NetvisorKey | 2 |
6 | iban | String | 1 | Account number (IBAN) | GB29NWBK60161331926819 |
6 | bicswift | String | 1 | BIC code | BUKBGB22 |
6 | bankname | String | 1 | Bank name | Barclays |
6 | clearingcode | String | 0...1 | Clearing code | |
6 | clearingnumber | String | 0...1 | Clearing number | |
6 | bankaddresss | String | 0...1 | Bank address | Bank Street 1 |
6 | country | String | 1 | Country code | GB |
Attr. | type | String | 1 | Country code type | ISO-3166 |
6 | currencycode | String | 1 | Currency code | GBP |
Attr. | type | String | 1 | Currency code type | ISO-4217 |
6 | isdefault | String | 0...1 | Use as a default or not | False |
6 | includeaddresssinforeignpayments | String | 0...1 | Add bank's address information to payment message besides BIC code | True |
2 | vendorcontactdetails | Aggr. | 0...1 | Vendor's contact information | |
3 | phonenumber | String | 0...1 | Phone number | +35850123456 |
3 | String | 0...1 | toimittaja@toimittajat.fi | ||
3 | faxnumber | String | 0...1 | Fax | |
3 | contactpersonname | String | 0...1 | Contact person's name | Timo Testaaja |
3 | contactpersonphonenumber | String | 0...1 | Contact person's phone number | +35840987654 |
3 | contactpersonemail | String | 0...1 | Contact person's email | timo.testaaja@toimittajat.fi |
3 | homepage | String | 0...1 | Home page | |
3 | comment | String | 0...1 | Comment | No comments |
2 | vendoradditionalinformation | Aggr. | 0...1 | ||
3 | defaultvatpercent | Numeric | 0...1 | Default VAT number | 24 |
3 | ispartialvatreducedprivileged | String | 0...1 | Partial VAT reduced priviledged | False |
3 | paymenttermdiscountpercent | Numeric | 0...1 | Discount percentage | |
3 | paymenttermcashdiscountsdays | Numeric | 0...1 | Discount days | |
3 | paymentermnetdays | Numeric | 0...1 | Default payment term days | |
3 | currencycode | Currency code | 0...1 | Default currency | EUR |
Attr. | type | String | 1 | Currency code type | ISO-4217 |
3 | vendordimensions | Aggr. | 0...1 | Default dimensions | |
4 | dimension | Aggr. | 1 | Dimension name | Kohde |
5 | dimensionname | String | 1 | Dimension name | Projects |
5 | dimensionitem | String | 1 | Dimension item | Project 1 |
3 | vendoraccountingaccounts | Aggr. | 0...1 | Vendor accounting accounts | |
4 | vendoraccountingaccount | Aggr. | 1...n | ||
5 | accountnumber | String | 1 | Account number | 4000 |
5 | accountname | String | 1 | Account name | Ostot |
5 | isdefault | String | 1 | Use as a default or not | True |
3 | vendoracceptancedetails | Aggr. | 0...1 | Acceptors | |
4 | vendoracceptancedetail | Aggr. | 1...n | ||
5 | acceptancename | String | 0...1 | Acceptor name | Taaki Tarkastaja |
5 | isdefault | String | 0...1 | Use as a default or not | False |
5 | isforced | String | 0...1 |
Did you find it helpful? Yes No
Send feedback