Before a sales invoice can be retrieved, a list of sales invoices must be requested for the id of the wanted invoice. With the id, specific information can be retrieved one at a time. When importing a sales invoice, it is recommended that the customer- and product registers are being up to date.

Sales invoices' handling operations are divided into the following resources:

IntegrationHTTP-methodResourceDTDSchemaExample
Get sales invoice or order listGETsalesinvoicelist.nv  Invoicelist
Download
Orderlist
Download
Get sales invoice or order detailsGETgetsalesinvoice.nv / getorder.nv  Invoice
Download
Order
Download
Import sales invoice, credit invoice or orderPOSTsalesinvoice.nvDownload Download
Get sales personnel listGETsalespersonnellist.nv  Download
Delete sales invoiceGETdeletesalesinvoice.nv  -
Update sales invoice statusPOSTupdatesalesinvoicestatus.nv  
Deleted sales invoicesGET
deletedsalesinvoices.nv


Deleted sales ordersGETdeletedsalesorders.nv


Invoicing and delivering sales orderPOSTsalesorderinvoicing.nv

Download
Import a comment into the sales order or invoice processing historyPOSTsalesinvoicecomment.nv

Download
Matching credit note to invoicePOSTmatchcreditnote.nv

Download
Get contract invoicing reportGETcontractinvoicingreport.nv


Get payment term listGETpaymenttermlist.nv

Download

Get sales invoice or order list

Resource: salesinvoicelist.nv

This resource can be used to retrieve a list of sales invoices and orders by changing the value of the ListType parameter.

Querystring parameters:

Parameter nameOccursDescriptionExample
listtype0...1Empty value if fetching sales invoice list
preinvoice if fetching order list
 
invoicesabovenetvisorkey0...1Includes only invoice after given id165 
begininvoicedate0...1Includes only invoice after given date2021-01-01 
endinvoicedate0...1Includes only invoices before given date2021-12-31 
invoicenumber0...1Includes only invoice with given invoice number 
invoicestatus0...1Includes only invoice with specified status, see below what is includedopen
lastmodifiedstart0...1Finds invoices that are modified after given date2021-10-23
lastmodifiedend0...1Finds invoices that are modified before given date2021-10-24
salesinvoicebatchid0...1 Includes only invoices with given Batch ID. See the description of the Sales Invoice Batch Handling 
customercode0...1Limist the list with customer code1234567
customernetvisorkey0...1Limits the list with customer Netvisor ID11
secondname0...1Includes only invoices with company's second nameSecond Name Ltd
secondnamenetvisorkey0...1Includes only invoices with company's second name Netvisor ID2
invoicingcustomercontrycode0...1Includes only invoices with specific invoicing customer country codeDE
replyoption0...1Value 1 returns the internal comment of the invoice. Value 2 returns currency amount and open currency amount of the sales invoice/order. Value 3 returns all previously mentioned.1

InvoiceStatus parameter can have the following values:

InvoiceStatusReturns invoices with status
openOPEN, OVERDUE, REMINDED, REQUESTED, COLLECTED
overdueOVERDUE, REMINDED, REQUESTED, COLLECTED
paidPAID
unsentUNSENT
creditlossCREDITLOSS
rejectedREJECTED

Response:

LevelElement nameType and lengthOccursDescriptionExample
rootRootAggr.   
1SalesInvoiceListAggr.1  
2SalesInvoiceAggr.0...n  
3NetvisorKeyNumeric 1Invoice identifier in Netvisor123
3InvoiceNumberString1Invoice number1234
3InvoiceDateDate 1Invoice date2020-11-09
Attr.formatString1Always ansiansi
3InvoiceStatusString1Status of the invoice or order. Returns sales invoice payment status.See table below.
Attr.substatusString0...1Invoice sub status. Will return status of receivables on the invoice: open, overdue, reminded, requested or collected. This attribute is not used for orders.open
Attr.isincollectionNumeric Is invoice in collection or not (Intrum/Duetto)0 or 1
3CustomerCodeString1Billed customer's code 
3CustomerNameString1Customer's name 
3ReferenceNumberString1Invoice reference number 
3InvoiceSumNumeric 1Invoice sum, two decimals12,34
3OpenSumNumeric 1Open sum, two decimals12,34
3UriString1Uri that can be used to get details of invoice or orderSee below
3AdditionalInformationAggr.0...1Added to the response if in the request have included replyoption parameter.
4PrivateCommentString1Invoice's internal additional informationprivate comment
4InvoiceCurrencySumNumeric0...1Currency sum of invoice/order1240
Attr.currencycodeString1Currency codeUSD
Attr.typeString1Type, always ISO-4217ISO-4217
4OpenCurrencySumNumeric0...1Open currency sum of invoice/order0
Attr.currencycodeString1Currency codeUSD
Attr.currencycodeString1Type, always ISO-4217ISO-4217

Return value differences for orders and invoices:

 InvoiceStatusURI
Invoiceopen, creditloss, paid, rejected/getsalesinvoice.nv?netvisorkey=123
Orderarchived, undelivered, delivered, billed/getorder.nv?netvisorkey=123

Get sales invoice details

Recourse: getsalesinvoice.nv or getorder.nv

Before a sales invoice can be retrieved, a list of sales invoices must be requested for the id of the wanted invoice. With the id, specific information can be retrieved one at a time. If user has modified the arrangement of the invoice's invoice rows in the Netvisor user interface, request retains that arrangement.

Same resource can be used to retrieve sales order. Follows same structure as salesinvoice and same parameters can be used.

Querystring parameters:

Parameter nameOccursDescriptionExample
netvisorkey1Invoice identifier of the salesinvoice125
pdfimage0...1If the parameter is not given, the response is the same as pdfimage=lastsentprintservice
lastsentprintservice 
returns the image of the sales invoice as a PDF-file (element: LastSentInvoicePDFBase64Data) if the sales invoice is sent to the printing service
PDF

Returns the image of the sales invoice as a PDF file (element: LastSentInvoicePDFBase64Data)
nopdf
Doesn't return anything
pdf
showprocesshistory0...1Returns the sending and printing history of the sales invoice in ProcessHistory-element1
includeattachments0...1Returns all the attachments in Base64-encoding1
showcommentlines0...1Returns invoice's comment rows inside Invoiceline aggregate1
netvisorkeylist0...1Can be used to get the full details of several invoices with given id. Max. 500 identifiers1,2,3
includedocuments0...1 When getting salesinvoice, returns orders related to the invoice.
 When getting salesorder, returns invoices related to the order. 
1

Example: getsalesinvoice.nv?netvisorkey=1234&pdfimage=pdf&showprocesshistory=1
Example: getorder.nv?netvisorkey=1234&pdfimage=pdf&showprocesshistory=1
Response:

LevelElement nameType and legthOccursDescriptionExample
rootRootAggr.1  
1SalesInvoiceAggr.1  
2SalesInvoiceNetvisorKeyString1Invoice Netvisor ID 
2SalesInvoiceNumberString1Invoice number 
2 SalesInvoiceDateDate1Invoice date2021-01-27
Attr.formatString1Date format, always ansiansi
2SalesInvoiceEventDateDate1Invoice event date2021-02-01
Attr.formatString1Event date format, always ansiansi
2SalesInvoiceValueDateDate 1 Invoice's Valuedate2021-01-27
Attr.formatString1Date format, always ansiansi
2SalesInvoiceDeliveryDateDate1Invoice's date of delivery2021-01-27
Attr.formatString1Always ansiansi
2SalesInvoiceDueDateDate1Invoice's due date2021-01-27
Attr.formatString1Always ansiansi
2SalesInvoiceReferencenumberString1Invoice's reference number7659221
2SalesInvoiceAmountNumeric1Invoice total124,50
Attr.iso4217currencycodeString0...1Currency used in invoiceUSD
Attr.currencyrateNumeric0...1 Currency conversion rate
0,91
2ForeignCurrencyAmountNumeric0...1Currency amount113,29
2SalesInvoiceCollectionCostNumeric
Collection charges10,00
2SellerIdentifierString1Indentifier of the seller (name)
Matti Meikäläinen
Attr.typeString1Always name meaning that element SellerIdentifier is name of sellername
2InvoiceStatusString1Status of the invoice/order
Maksettu
Attr.statusString1Status code of the invoice/order:
Invoice: open, paid, unsent, overdue, reminded, requested, collected, creditloss or rejected
Order: archived, undelivered, delivered, billed
paid
2InvoiceVoucherString0...1Invoice voucher number27
Attr.NetvisorKeyString1Voucher Netvisor ID8000
2SalesInvoiceFreeTextBeforeLinesString1Free text before invoice lines 
2SalesInvoiceFreeTextAfterLinesString1Free text after Invoice lines 
2 SalesInvoiceOurReferenceString1Our refence
 
2SalesInvoiceYourReferenceString1Your reference 
2SalesInvoicePrivateCommentString1Comment that will not be visible on the invoice 
2SalesInvoiceAgreementIdentifierString1Contract ID
 
2InvoicingCustomerCodeString1Customer's Code
2InvoicingCustomerNameString1Customer's Name 
2InvoicingCustomerNameExtensionString1Customer's Name Extension 
2InvoicingCustomerNetvisorKeyString1Customer's Netvisor Key/ID 
2InvoicingCustomerOrganizationIdentifierString1Customer's Organization identifierIf customer is private customer, field will be empty.
2InvoicingCustomerAddresslineString1Customer's AddressPL 316
2InvoicingCustomerAdditionalAddressLineString1Customer's Adress, additional line 
2InvoicingCustomerPostnumberString1Customer's Post Number50123
2InvoicingCustomerTownString1Customer's City
Lappeenranta
2InvoicingCustomerCountryCodeString1Customer's Country codeFINLAND
2MatchPartialPaymentsByDefaultString1Yes or NoYes
2DeliveryAddressNameString1Name for the delivery 
2DeliveryAddressLineString1Address of the delivery 
2DeliveryAddressPostnumberString1Post number of the delivery 
2DeliveryAddressTownString1City of the delivery 
2DeliveryAddressCountryCodeString1Country code for the delivery 
2DeliveryMethodString1Method of deliveryDelivered
2DeliveryTermString1Terms of deliveryFree Deliverer
2PaymentTermNetDaysString1Days for the terms of payment. If payment term is due date this will return empty value11
2PaymentTermCashDiscountDaysString 1Days for cash discount. If payment term is due date this will return empty value5
2PaymentTermCashDiscountString 1Amount of cash discount. If payment term is due date this will return empty value10
Attr.typeString1Always percentagepercentage
2WaybillidentifierString1Waybill number033000050143
2DeliveryToCustomerDate
String0...1Sales order delivery to customer date
2020-10-13
Attr.formatString1Delivery date format, always ansiansi
2DeliveryToCustomerWeek
String
0...1Sales order delivery to customer week42/2020
2TaxHandlingClause
String0...1Sales invoice tax handling clauseAVL 8 c §, käännetty verovelvollisuus
Attr.NetvisorKeyString1Tax handling clause's NetvisorID14
2DeliveryOfficeIdentifierNumeric1

2ContactPersonNetvisorKeyNumeric0...1Contact person's NetvisorID123
2ContactPersonFirstNameString0...1Contact person's first nameMatti
2ContactPersonLastNameString0...1Contact person's last name Meikäläinen
2ContactPersonPhoneNumberNumeric0...1Contact person's phone number050-1234567
2ContactPersonEmailString0...1Contact person's email addressmatti.meikalainen@firma.fi
2LastSentInvoicePDFBase64DataBase640...1PDF information of previously sent invoiceS89O3Ly1Lr59NB
2
CreditedInvoiceNetvisorKey
Numeric0...1Netvisorkey of the credited invoice27
2InvoiceLinesAggr.1  
3InvoiceLineAggr.1  
4SalesInvoiceProductLineAggr.0...n  
5NetvisorKeyString1Id of the product line17536
5ProductIdentifierString1Id of the productTEMP1
Attr.typeString1Always customercustomer
5ProductNameString1Name of the productExample product
5ProductNetvisorKeyString1Netvisor Key/ID of the product 
5ProductUnitPriceNumeric1Unit price of the product7,00
5ProductPurchasePriceNumeric1Purchase price of the product 
5ProductVatPercentageString1VAT percentage of the product24
Attr.VatCodeString1VAT codeKOMY
5ProductPrimaryEanCodeString1Primary EAN code
5ProductSecondaryEanCodeString1Secondary EAN code
5SalesInvoiceProductLineQuantityNumeric1Quantity of product 
5SalesInvoiceProductLineUnitString1Unit of productkpl
5SalesInvoiceProductLineDeliveryDateDate0...1Sales order line delivery date 2021-04-16
5SalesInvoiceProductLineDiscountPercentageNumeric 1Discount percentage 
5SalesInvoiceProductLineFreeTextString1Free text for line 
5SalesInvoiceProductLineVatSumNumeric 1Line vat sum rounded to two decimals1,68
5SalesInvoiceProductLineLinesumNumeric 1Line sum rounded to two decimals8,68
5SalesInvoiceProductLineInventoryIDNumeric1Warehouse ID of product1
5SalesInvoiceProductLineInventoryNameString1Warehouse name of productExample warehouse
5AccountingAccountSuggestionNumeric1Posting suggestion, account NetvisorID551
5AccountingAccountSuggestionAccountNumberNumeric1Posting
5dimensionAggr.0...n  
6dimensionnameString1Dimension headerCity
6dimensionitemString1Dimension nameHelsinki
5ProvisionPercentageNumeric1Provision percentage12
4SalesInvoiceCommentLineAggr.0...n  
5CommentString1Comment lineComment
3SalesInvoiceAttachmentsAggr.0...1  
4SalesinvoiceAttachmentAggr.1...n  
5mimetypeString1Contents file formatimage/jpeg
5attachmentdescriptionString1Description of attachment 
5filenameString1FilenameExample_picture.jpg
5documentdataBase641Attachment in Base64-encodingS89O3Ly1Lr59NBS89
3documentsAggr.1Invoices/orders related to the order/invoice 
4salesorderAggr.1...nNote! If getorder.nv is used, the element name is salesinvoice 
4netvisorkeyNumeric1Netvisor ID of order related to the invoice /
Netvisor ID of invoice related to the order
12345
4ordernumberNumeric1Number of order related to the invoice /
Number of invoice related to the order
Note! If getorder.nv is used, the element name is invoicenumber
1001

Import sales invoice, credit invoice or order

Resource: salesinvoice.nv

The API makes it possible to add or edit a sales invoice, it's product-, sub- and comment lines, attachments, voucher lines and customer specific fields in Netvisor.

The required fields for importing a sales invoice are:

  • Date of the invoice
  • Sum total
  • Invoice status
  • Customer's linking information
  • Net day of the terms of payment or due date
  • At least one invoice line with the following information
    • Product linking information
    • Product name
    • Product's unit price
    • Product's VAT percentage and code
    • Product's unit count

The salesinvoice can be imported as a salesinvoice draft with status "invoicedraft". It is not possible to give invoice number or import invoice voucherlines for invoice drafts. Invoice draft can be updated to salesinvoice with the parameter edit.

Credit note is imported trough the API with the same message structure. The only difference is that unit count and sum total are set to negative numbers. Also productline vat sum and productline sum are set to negative numbers if they are given. Credit note is not automatically matched to existing sales invoice. Connecting credit note and sales invoice must be done either via API using resource matchcreditnote.nv or manually in Netvisor UI.

Netvisor rounds invoice line rowsum and invoice total sum by 2 digits when importing XML

Billing and delivery customer is focused to sales invoice by Netvisor key or by customer code. Netvisor key is database ID and customer code is individual code given in customer register by Netvisor user. These can be fetched by using customerlist.nv resource.

When only Invoicingcustomeridentifier is given in the Sales Invoice XML and no other invoicing address or delivery address details are on the XML, the API will retrieve this information automatically from customer register. In other hand if any other billing customer detail (i.e. postal address) is given, nothing is retrieved from the customer register.

If an alternative billing customer has been determined to target customer, the API will automatically retrieve the alternative customers information to the imported invoice. In this case, the billing address information in the imported material is not used.

The sales invoice can be accrued either on invoice or invoice row level using either equal division or allocation curve. Accrual can be imported for both unsent or open invoices. The accrual voucers are generated according to data on the xml after the invoice is sent or when importing open invoices, when the invoice is imported automaticallyby the system. Please note that accruing one month is possible only when the accrual is not on the same month as the invoice date. E.g. if the sales invoice date is in April the accrual can be done earliest for May or for any time after that. The accrual cannot be done to the past.

Querystring parameters:

Parameter nameOccursDescriptionExample
Method1add or edit. When using method edit, all original order/invoice details must be given if wish to keep them.Add
Id0...1Must be defined if method = edit 

The following describes the XML message to import (POST) a sales invoice into Netvisor:

LevelElement nameType and lengthOccursDescriptionExample
RootrootAggr.1  
1salesinvoiceAggr.1  
2salesinvoicenumberNumeric max. length 18 digits0...1If number is not given, Netvisor automatically picks next free number. Cannot be given for invoice drafts.  123456
2salesinvoicedateDate1Sales invoice date2019-12-31
Attr.formatString1Always ansiansi
2salesinvoiceeventdateDate0...1Invoice's event date. This forms the voucher date.2020-01-01
Attr.formatString1Always ansiansi
2salesinvoiceduedateDate0...1Sales invoice due date. Compulsory if payment term is not given. When due date is given, Netvisor sets payment term automatically to 'Due date'. The message can not include both due date and payment term, only other element is given.2020-01-14
Attr.formatString1Always ansiansi
2salesinvoicevaluedateDate0...1Invoice's valuedate. If given, the net days of payment term are applied to the valuedate2019-12-31
Attr.formatString1Always ansiansi
2salesinvoicedeliverydateDate0...1Sales invoice delivery/arrival date. Can only be given for sales orders.2020-01-04
Attr.formatString1Always ansiansi
2salesinvoicedeliverytocustomerdateDate or week number0...1Delivery date for customer. Date or week number. For sales order only.2018-W12
Attr.formatString 1Delivery date for customer, formatansi
Attr.typeString1Delivery date for customer. date or weeknumber  weeknumber
2salesinvoicewaybillidentifier
String, max 35 characters0...1Waybill number/identifier. For sales order only.33000050143
2salesinvoiceproductpackagepallet
Number 0...1Sales order package. For sales order only.2
Attr.typeString1Pallet code type, GS1GS1
Attr.amountString0...1Pallet amount2
2salesinvoicereferencenumberReferece0...1Invoice reference number. Must be in correct format with check sum. If not given, Netvisor forms the reference number for invoice.1070
2salesinvoiceamountNumeric1Total amount of the invoice.
If given, amount is not calculated from the invoice rows.

Possible to give as empty value </salesinvoiceamount>, then the amount is calculated from the invoice rows

Notice that if you are importing already sent invoices, we recommend that you give the amount.
100,99
Attr.iso4217currencycodeString0...1If not given, currency code from company´s information is used. Otherwise code must be given in ISO 4217 standard
USD
Attr.currencyrateString0...1If not given, daily currency rate from European central bank is used. If there is no existing currency rate value, then value 1 used automatically1,33
Attr.pricetypeString0...1netvisor or customer. Customer does nothing but if value is netvisor, Netvisor's price groups and customer prices will be used for invoice rows. SalesInvoiceAmount -value should be 0 so that invoice amout is calculated correctly from invoice rows.netvisor
2selleridentifierString0...1Link seller to the invoice. If you want to link the seller information to the seller found on Netvisor, you must set both the seller's link information (selleridentifier) and the seller's name (the next element 'sellername').
Netvisor's seller information can be retrieved from the resource: Get sales personnel list, the list returns the Netvisor Key used to link the seller.
1
Attr.typeString1Type of link:
netvisor (netvisorkey) or customer (name)

Linking can be done with the seller's Netvisor Key (primary) or the seller's name. When the linking information and the name of the seller (element sellername) are imported, the name of the seller corresponding to the ID in Netvisor becomes the seller on the invoice. If the link is made by name, then the given string is compared forward and backward to the list of Netvisor seller. If seller cannot be found on Netvisor, the interface will response incomplete information.
netvisor
2sellernameString, max. length 500...1Free form name of the sellerMatti Mallikas
2invoicetypeString0...1invoice, order or invoicedraft.
Default is invoice
invoice
2salesinvoicestatusString1Status of invoice
open or unsent for invoice,
delivered or undelivered for order
open
Attr.typeString1Use netvisornetvisor
2salesinvoicefreetextbeforelinesString, max. length 500 0...1Free text before before invoice lines  
2salesinvoicefreetextafterlinesString, max. length 5000...1Free text after invoice lines  
2salesinvoiceourreferenceString, max. length 200  0...1Information for "our reference" field  
2salesinvoiceyourreferenceString, max. length 200 0...1Information for "your reference" field  
2salesinvoiceprivatecommentString, max. length 5000...1Shown only in Netvisor interface, not printed on invoice form 
2invoicingcustomeridentifierString1Information used to link invoicing customer to invoice. Customer must be already in Netvisor. Value can be customer code or id of customer record in Netvisor (see type attribute)MM
Attr.typeString1 Type of link: netvisor (=Netvisor ID), customer (=customer code), or organizationunitnumber (=OVT-identifier) customer
Attr.contactpersonidString0...1Customer's contact person's Netvisor ID. Can be retreived with getcustomer.nv.4012
2invoicingcustomernameString, max. length 2500...1Will not be collected from NetvisorMatti
2invoicingcustomernameextensionString, max. length 250 0...1Will not be collected from NetvisorMeikäläinen
2invoicingcustomeraddresslineString, max. length 100 0...1Will not be collected from NetvisorPajukuja 1
2invoicingcustomeradditionaladdresslineString, max. length 1000...1Will not be collected from Netvisor 
2invoicingcustomerpostnumberString, max. length 50 0...1Will not be collected from Netvisor53100
2invoicingcustomertownString, max. length 50 0...1Will not be collected from NetvisorLappeenranta
2invoicingcustomercountrycodeString0...1In ISO 3316 format. *)FI
Attr.typeString1Will not be collected from NetvisorISO-3316
2officeidentifierString0...1Office identifier. Office identifier in Netvisor. NOTE! This is not Office's Netvisorkey. Office identifier can be given in the message and given particular office (or first match) is searched or new office is created (type=automatic). NOTE! When using this element, all office details must be given in the message.
Attr.typeString0...1automatic when new office should be created according to to sent message. NOTE! All office details must be given in the message.
2deliveryofficeString0...1Delivery office target to Netvisor delivery office in customer details. NOTE! All delivery office details must be given in the message
Attr.typeString1Target type:
Customer=Delivery office name
Netvisor=Delivery office NetvisorID

2deliveryaddressnameString, max. length 250 0...1Will not be collected from Netvisor. Must be given if delivery details should be shown on invoice PDF.Maija
2deliveryaddresslineString, max. length 100 0...1Will not be collected from NetvisorPajukuja 2
2deliveryaddresspostnumberString, max. length 50 0...1Will not be collected from Netvisor55100
2deliveryaddresstownString, max. length 50 0...1Will not be collected from NetvisorImatra
2deliveryaddresscountrycodeString0...1Will not be collected from NetvisorFI
Attr.typeString1Will not be collected from NetvisorISO-3316
2deliverymethodString, max. length 50 0...1Free form text. If given value is not found from Netvisor, then value is created as new delivery method in NetvisorInstalled
2deliverytermString, max. length 50 0...1Free form text. If given value is not found from Netvisor, then value is created as new delivery term in NetvisorAccording to agreement
2salesinvoicetaxhandlingtypeString0...1countrygroup, forcedomestic, domesticconstructionservice or notaxhandling. *1)
If not given, taxhandlingtype from customer's information will be used
countrygroup
2paymenttermNumeerinen0...1Payment term's NetvisorKey1
Attr.typeMerkkijono1Payment term's type:
netvisor = allocating to the payment term based on payment term's NetvisorKey
customerdefault = customer's default payment term
companydefault = company's default payment term
default = primary customer's default payment term. If not set, the company's default payment term is used
netvisor
2paymenttermnetdaysNumeric 1Invoice date + paymenttermnetdays = invoice duedate.
Payment term: "14 days net"
14
2paymenttermcashdiscountdaysNumeric 0...1Cash discount days for the payment term. Payment term: "14 days net, 5 days" 5
2paymenttermcashdiscountNumeric 0...1Cash discount percent Payment term: "14 days net, 5 days-10%"10
Attr.typeString1Type of discount, always percentagepercentage
2expectpartialpaymentsNumeric 0...11 = yes, 0 = no. Default 0. If the invoice accepts partial payments, the invoice is also accepting payments outside the the cash discount tolerances1
2overridevouchersalesreceivablesaccountnumberNumeric0...1When given, this will override the default sales receivables account number in Netvisor. Works only with salesinvoices with status "Open". 1703   
2salesinvoiceagreementidentifierString, max. length 350...1Contract ID 
2printchannelformatString0...1  
Attr.typeString 1netvisor or customernetvisor
2secondnameString 0...1supplementary firm nameExample name
Attr.typeString1netvisor (NetvisorKey) or customer (name)customer
2overriderateofoverdueNumeric0...1Penalty interest-%, overrides Netvisor default5,5
2ordernumberString0...1Order number258741
2proposedaccountNumeric0...1Customer's accounting suggestion1011
2typeString1customercustomer
2accountdimensiontextString, max 350...1Customer's dimension for whole invoice. In Netvisor UI this can be found from sales invoice's Additional information under Additional customer information fields. Can also be imported for invoice rows, see documentation below. cost center
2collectioncostNumeric0...1Collection cost. Only positive values (and 0) are allowed. Only for sales invoices.15
2isthirdpartysalesNumeric0...1Triangular trade. 0 or 1, where 1 chooses the option "Triangular trade" for sales invoice. Used only for sales invoices.1
2invoicelinesAggr.1  

Invoice lines can be either product lines, sublines or comment lines. Product in a product line must exist in Netvisor and be linked to the line either with Netvisor-key or customer specific key. However product name, price and other information can be altered. 

VAT-code is compulsory for product lines. You can check the VAT-codes from the table below. The given VAT-code is used on the voucher if the status of the imported invoice is open. If the invoice status is unsent the VAT-code on the voucher is taken from the accounting account settings. 

If the imported invoice has both product- and comment lines, their order will be the same as in the imported material.

The sales invoice can be accrued on invoice row level using either equal division or allocation curve. When using equal division elements endmonth and endyear are given on the xml. When using allocation curve these elements are not used but the element divisioncurvename is given on the xml. Please note that accruing one month is possible only when the accrual is not on the same month as the invoice date. E.g. if the sales invoice date is in April the accrual can be done earliest for May or for any time after that. The accrual cannot be done to the past.

If product lines are needed, structure for InvoiceLine aggregate is this:

LevelElement nameType and lengthOccursDescriptionExample
3invoicelineAggr.1...n  
4salesinvoiceproductlineAggr.1  
5productidentifierString1Product identifier, either netvisorkey or given product code. Product must be founded in Netvisor. 
Attr.typeString1Type of indentifier:
- customer (given product code)
- netvisor (netvisorkey)
- primaryeancode
(given primary EAN-code)
- secondaryeancode
(given secondary EAN-code)
netvisor
5productnameString, max. 2000...1Name of the product. If not given will be retrieved from Netvisor.test product
5productunitpriceNumeric, max 12 decimal1Product unit price, not retrieved from Netvisor10,05
Attr.typeString1Type of unit price, net or grossnet
5productunitpurchasepriceNumeric0...1Product unit purchase price1,05
Attr.typeString1Type of unit purchase price, always netnet
5productvatpercentageNumeric1Must not conflict with vat code24
Attr.vatcodeString1NONE, KOOS, EUOS, EUUO, EUPO, 100, KOMY, EUMY, EUUM, EUPM312, EUPM309, MUUL, EVTO, EVPO, RAMY, RAOS or EVROKOMY
5salesinvoiceproductlinequantityNumeric1Amount of products. Can be integer or decimal. Max eight decimals (e.g. 3,55555555)5
5salesinvoiceproductlinediscountpercentageNumeric0...1Discount percentage. If the attribute given, Netvisor will use the discount percentage from customer details in Netvisor10
Attr.typeString1netvisornetvisor
5salesinvoiceproductlinefreetextString, max. 5120...1Free text for the product line 
5salesinvoiceproductlinevatsumNumeric0...1Tax for the product line. Given if amount calculated by Netvisor is wished to be overridden 11,00
5salesinvoiceproductlinesumNumeric0...1Line's gross total sum. Given if sum calculated by Netvisor is wished to be overridden50,00
 Note! Both salesinvoiceproductlinesum and salesinvoiceproductlinevatsum elements are required if sum calculated by Netvisor is wished to be overridden.
5salesinvoiceproductlineinventoryidNumeric0...1Warehouse ID of productline1
5accountingaccountsuggestionNumeric0...1Suggestion for accounting account. Must be found in the system3000
5dimensionAggr.0...n  
6dimensionnameString, max. 501Dimension, if the dimension is not found, the system creates it 
6dimensionitemString, max. 2001Dimension name 
5provisionpercentage Numeric0...1Provision percentage12
5accrualruleAggr. 0...1 Accrual rule for invoice row, you can use equal division OR allocation curve. Invoicestatus has to be "open", that the voucher is generated. 
6startmonthNumeric1Starting month9
6startyearNumeric1Starting year2020
6endmonthNumeric0...1 Ending month (only with equal division)12
6endyearNumeric 0...1 Ending year (only with equal division)2020
6divisioncurvenameString 0...1Allocation curve (only with allocation curve)
Has to be predefined in Netvisor view: 'Financials > Budgeting settings > Allocation curves'
quarter
5productunitnameString, max 140...1Product unit. If not given, Netvisor will use the product unit from product details in Netvisor. Cannot be given if the compay is using Extended product management.pcs
5deliverydateDate0...1Sales order productline delivery date. For sales order only.2021-04-14
Attr.formatString1Always ansi
5OrderNumberNumeric0...1Product order number.1232
5proposedaccountNumeric0...1Customer's accounting suggestion1011
5typeString1customercustomer
5accountdimensiontextString, max 350...1Customer's dimension for invoice rowcost center

If comment lines are needed, use the following structure for InvoiceLine aggregate:

LevelElement nameType and lengthOccursDescriptionExample
3invoicelineAggr.1...n  
4salesinvoicecommentlineAggr.1  
5commentString, max 60001Comment for the invoice Comment for the invoice 

If sublines are needed, use the following structure for InvoiceLine aggregate:

LevelElement nameType and lengthOccursDescriptionExample
3invoicelineAggr.1...n  
4salesinvoicesublineAggr.1  
5sublinearticleidentifierString, max 350...1Product code1
5sublinearticlenameString, max 1001Product nameProduct
5sublinedescriptionString, max 5120...1Line descriptionDescription
5sublineunitcodeString, max 140...1Product unitpcs
5sublineunitpriceNumeric0...1Unit price10
5sublinedeliveredquantityNumeric0...1Delivered quantity1
5sublinediscountpercentNumeric0...1Discount percent0
5sublinevatpercentNumeric0...1Vat percent24
5sublinesumNumeric0...1Line sum12,4
5sublinevatsumNumeric0...1Vat sum2,4

After the invoice lines, the structure continues as follows:

LevelElement nameType and lengthOccursDescriptionExample
2invoicevoucherlinesAggr.0...1*2 
3voucherlineAggr.1...n  
4linesumNumeric1Line sum. Positive value will be recorded as debit, and negative as credit 100
Attr. typeString1Type of sum, net or grossnet
4descriptionString, max. 255 0...1Free description text  
4accountnumberString1Account number, must be found in the system 3000
4vatpercentNumeric1VAT percent. Must not conflict with VAT code 24
Attr.vatcodeNumeric1NONE, KOOS, EUOS, EUUO, EUPO, 100, KOMY, EUMY, EUUM, EUPM312, EUPM309, MUUL, EVTO, EVPO, RAMY, RAOS or EVRO. Must not conflict with VAT percent. Check table below.KOMY
5dimensionAggr.0...n  
6dimensionnameString1Dimension nameProject 1
6dimensionitemString1Dimension item Payroll
2accrualruleAggr. 0...1Accrual rule for the whole invoice, you can use equal division OR allocation curve. Invoicestatus has to be "open", that the voucher is generated.
 
3startmonthNumeric 1Starting month9
3startyearNumeric1Starting year2020
3endmonthNumeric0...1Ending month (only with equal division)12
3endyearNumeric0...1Ending year (only with equal division)20
3divisioncurvenameString0...1Allocation curve (only with allocation curve)
Has to be predefined in Netvisor view: 'Financials > Budgeting settings > Allocation curves'
quarter
2salesinvoiceattachmentsAggr.0...1  
3salesinvoiceattachmentAggr.1...n  
4mimetypeString1MIME type of the attachment Application/pdf 
4attachmentdescriptionString, max 100 characters 1Description of the attachment  
4filenameString, max 255 characters 1Filename of the attachment project1.pdf
4documentdataString1Base64 encoded data of the attachment  
Attr.typeString1By default is used the pdf, if the attribute is not provided.
Values:
finvoice, Files to be attached to electronic invoice

pdf, Files to be attached for printing
pdf
4printbydefaultNumeric0...1NOTE! Is not given if the attachment type is Finvoice (otherwise the request is rejected)

1= true, 0 = false
1
2customtagsAggr.0...1

3tagAggr.1...n

4tagnameString1The name of the customer additional field in NetvisorCustomer additional field name
4tagvalueString1Value of the additional fieldAdditional information
Attr.typeString1Type of the additional field: float (selection list), date, text or enum (decimal number)text

1*) If value is other than DomesticConstructionService is used in SalesInvoiceTaxHandling field, then value of this field is overriden with value DomesticConstructionService if invoice contains at least one line containing tax code Construction_Service_Sales. All lines in invoice must have same tax code.

2*) While importing a sales invoice, the material can include separate voucher lines, if the voucher is wanted to be formed manually. The system will use the voucher lines of the imported material, and not form voucher lines automatically if they have been included. The voucher lines in sales invoice are similar to those in Get Accounting Data request.

VAT identificationVAT-codeVAT precent
No VAT processingNONE0
Domestic salesKOMY0, 10, 14, 24
EU salesEUMY0
Sales outside the EUEUUM0
Domestic purchaseKOOS0, 10, 14, 24
EU purchaseEUOS0, 10, 14, 24
EU service purchaseEUPO0, 10, 14, 24
Non - EU purchasesEUUO0, 10, 14, 24
100% deductible tax1000
312 EU service salesEUPM3120
309 EU service salesEUPM3090, 10, 14, 24
Other turnover excluding VAT (310)MUUL0, 10, 14, 24
Purchases of goods from other EU countries, non-deductibleEVTO0, 10, 14, 24
Purchases of services from other EU countries, non-deductibleEVPO0, 10, 14, 24
Non-deductible reverse chargeEVKV0, 10, 14, 24
Reverse chargeKAVE0, 10, 14, 24
Sale of construction servicesRAMY0
Purchase of construction serviceRAOS0, 10, 14, 24
Non-deductible purchase of construction serviceEVRO0, 10, 14, 24
Non-EU imports VATMAAL0, 10, 14, 24
Non-EU imports are not eligible for VAT deductionEVMA0, 10, 14, 24
Domestic salesKOMY00

Delete sales invoice

Resource: deletesalesinvoice.nv

This resource differs from others by it doesn't need XML message to work. Request is transferred in URI.

With this resource it is possible to remove sales invoice or sales order and its attachments, dimension links, vouchers and etc.
Querystring parameters:

Parameter nameOccursDescription
invoiceid1Invoice Netvisor ID
orderid0...1Sales order Netvisor ID

Update sales invoice status

Resource: updatesalesinvoicestatus.nv

This resource differs from others by it doesn't need XML message to work. Request is transferred in URI.
With this resource it is possible to update one or multiple (max 100) sales invoice statuses. If status is update to any other state than "unsent", sales invoice voucher is created automatically.
Querystring parameters:

Parameter nameOccursExampleDescription
netvisorkey1145Invoice Netvisor ID
netvisorkeylist0...11, 2, 3Invoices Netvisor ID list separated with comma
status1openTo which status invoice/invoices will be set
- open
- overdue
- reminded
- requested
- collected
- paid
- creditloss
- unsent

Deleted sales invoices

Resource: deletedsalesinvoices.nv

Retrieves sales invoices that have been deleted since the given date. Sales invoices can be retrieved up to 7 days from the given date.

Querystring parameters:

ParameterOccursDescriptionExample
deletedsince1Mandatory parameter. Retrieves events that have been deleted since the given date. Events can be retrieved up to 7 days from the given date.
2022-06-08

Response:

Level
ElementTypeOccursDescriptionExample
rootrootAggr.1  
1
DeletedSalesInvoicesAggr.1

2
DeletedSalesInvoiceAggr.0...n


3
NetvisorKeyNumeric1Netvisor ID of sales invoice5
3
DeleteDateDate
1Delete date2022-06-08 15:14
Attr.
formatString1Date format, always ansiansi

Deleted sales orders

Resource: deletedsalesorders.nv

Retrieves sales orders that have been deleted since the given date. Sales orders can be retrieved up to 7 days from the given date.

Querystring parameters:

ParameterOccursDescriptionExample
deletedsince1Mandatory parameter. Retrieves events that have been deleted since the given date. Events can be retrieved up to 7 days from the given date.
2022-06-08

Response:

Level
ElementTypeOccursDescriptionExample
rootrootAggr.1  
1
DeletedSalesOrdersAggr.1

2
DeletedSalesOrderAggr.0...n


3
NetvisorKeyNumeric1Netvisor ID of sales order5
3
DeleteDateDate
1Delete date2022-06-08 15:14
Attr.
formatString1Date format, always ansiansi

Invoicing and delivering sales order

Resource: salesorderinvoicing.nv

This resource can be used for invoicing and/or delivering an existing sales order.

Querystring parameters:

ParameterOccursDescription
method1deliveryonly (only delivered) tai billanddelivery (to be delivered and invoiced)
copysublines0...1Copy subtotal rows to invoice; true or false
updatemidprice0...1Update the current average price for the products on the invoice row; true or false

The following describes the imported XML message (POST):

LevelElementType and lengthOccursDescEsimerkki
1rootAggr.1  
2salesorderinvoicingAggr.1

3invoicingcustomerAggr.1

4netvisorkeyString1Invoicing customer NetvisorID1031
4invoicedateDate1Order date2021-04-16
Attr.formatSting1Date format, always ansiansi
5invoicingproductlinesAggr.1Rows to be invoiced/delivered
6invoicingproductlineAggr.1

7netvisorkeyNumeric1NetvisorID of the sales order line123
7deliverydateDate1Delivery date of the sales order line2021-04-16
Attr.formatString1Date format, always ansiansi
7deliveryamountString1Delivered amount1
Attr.ispostdeliverySting1Is post delivery; true or falsefalse
7inventoryplaceString0...1Inventory place ID321
Attr.typeString1Always netvisornetvisor

Import a comment into the sales order or invoice processing history

Resource: salesinvoicecomment.nv

The resource can be used to import a comment into the processing history of a sales order or invoice.

The following describes the imported XML message (POST):

LevelElementType and lengthOccursDescriptionExamle
1rootAggr.1  
2salesinvoicecommentsAggr.1

3salesinvoicecommentAggr.1

4invoicetypeString1Invoice type:
- order
- invoice
- invoicedraft
invoice
4invoicenetvisorkeyNumeric1NetvisorID of the invoice, order or draft123
4commentString, max 5001Comment to the processing historycomment

Matching credit note to invoice

Resource: matchcreditnote.nv

The resource can be used to match credit note to existing sales invoice. The invoice status of both invoices has to be "Sent" and vouchers have to be created. Credit note and invoice have to be in the same currency.

LevelElementType and lengthOccursDescriptionExamle
1rootAggr.1  
2matchcreditnoteAggr.1

3creditnotenetvisorkeyNumeric1Credit note NetvisorKey2597
3invoicenetvisorkeyNumeric1Invoice NetvisorKey2582

Get contract invoicing report

Resurssi: contractinvoicingreport.nv

This resource can be used to retrieve the contract invoicing report via API. 

Querystring parameters:

ParameterOccursDescriptionExample
year1Mandatory paramater, predicted year2022
collectionnetvisorkey0...1Optional, service basket's NetvisorKey1

Response:

LevelElementType and lengthOccursDescriptionExample
1rootAggr.1  
2ContractInvoicingAggr.1

3ServiceCollectionAggr.1

4NameString1Service basket name
Attr.NetvisorkeyNumeric1Service basket's NetvisorKey2587
4BeginDatePäivämäärä1Invoicing periods from01.04.2022
Attr.FormatString1Date format, always ansiansi
4EndDatePäivämäärä1Invoicing periods until, if the element value is returned empty, the invoicing period is valid for until further notice
Attr.FormatString0...1Date format, always ansiansi
4PeriodIntervalNumeric1Invoicing period interval, indicates the numeric value of period interval. 2
Attr.TypeString1Type of invoicing period interval, day, week, month, yearmonth
4PeriodsAggr.1

5PeriodAggr.1

6MonthNumeric1Year and month of the contract invoicing report2022-01
6InvoicedNumeric1Created invoices14 016,00
6ForecastNumeric1Forecast sum28 032,00
6TotalNumeric1Total sum42 048,00

Get Payment term list

This resource can be used to retrieve the payment term list

Resource: paymenttermlist.nv

LevelElementType and lengthOccursDescriptionExample
rootrootAggr.1

1PaymentTermListAggr.1

2PaymentTermAggr.0...n

3NetvisorKeyNumeric1Payment Term's Netvisorkey123
3DescriptionString1Payment Term's description14 days net
3NetDaysNumeric1Number of net days14
3DiscountDaysNumeric1Number of discount days5
3DiscountPercentNumeric1Discount Percentage10
3IsDefaultNumeric1Is this the default payment term, 1 = yes, 0 = no1

xml
xml
(456 Bytes)
xml
(4.35 KB)
xml
(472 Bytes)
xml
(178 Bytes)
xml

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.