Recourse: getsalesinvoice.nv or getorder.nv

HTTP-method: GET

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 identifiers. *See below how the response differs from others with this parameter1,2,3
includedocuments0...1 When getting salesinvoice, returns orders related to the invoice.
 When getting salesorder, returns invoices related to the order. 
1
replyoption0...1Returns additional fields in response as follows:

with value 1: Events
value 2: Accrual
value 3: Events + Accrual
value 4: Factoring
value 5: Events + Factoring
value 8: PaymentPlan
Value 16: CreditedInvoice NetvisorKey andInvoiceNumber
Value 31: Includes all additional fields


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
2InvoicingCustomerInCollectionProhibitation
Numeric
1Customer in collection prohibition, 1=yes, 0=no
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
2PaymentInterest
String1Penalty interest5
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 address[email protected]
2LastSentInvoicePDFBase64DataBase640...1PDF information of previously sent invoiceS89O3Ly1Lr59NB
2CreditedInvoiceNetvisorKeyNumeric0...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
5SalesInvoiceProductLineSumNumeric 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
3Events
Aggr.1Shipment and status information related to the invoice (processing history records)
The aggregate will only appear in the response when the replyoption parameter is set to 1
4EventAggr.1...n

5TimestampDate + Time1Date and time of entry
2023-11-07 18:25:25.717

Attr.format
String1Type of the dateansi
5UserNameString1Name of the user who performed the operation
Example Person
5DescriptionString1Description of the entryInvoice created
Attr.
Type
String1Type of the entry
StatusAndDeliveryInformation

3AccrualAggr.1Sales invoice accrual informationThe aggregate will only appear in the response if the replyoption parameter is set to 2
4
DivisonCurve
String1Name of the division curveOne month
Attr.
NetvisorKeyNumeric1Netvisorkey of the division curve1
4StartMonthNumeric1Start month of the accrual6
4StartYearNumeric1Start year of the accrual2024
4EndMonthNumeric1End month of the accrual6
4EndYearNumeric1End year of the accrual2024
3FactoringAccount
String1Name of the factoring accountFactoring
Attr.NetvisorKeyNumeric1Netvisorkey of the factoring account1
3PaymentPlan
Aggr.1Sales invoice payment planThe aggregate will only appear in the response if the replyoption parameter is set to 8
4PaymentAggr.1...n

5DueDateDate
1Instalment due date
2024-06-25

Attr.
formatString
1Format of the dateansi
5SumNumeric
1Instalment sum
46,75

*If the parameter netvisorkeylist is used and the response returns more than one sales invoice, one SalesInvoices aggregate is added to the response, otherwise the response follows the same pattern:

LevelElement nameType and lengthOccursDescriptionExample
rootRootAggr.1

1SalesInvoicesAggr.1

2SalesInvoiceAggr.1..n

3SalesInvoiceNetvisorKeyString1Netvisor ID of invoice
1234




Muutoshistoria

PäivämääräMuutosKuvaus
12.12.2024Adding new elementInvoicingCustomerInCollectionProhibitation
Customer in collection prohibition, 1=yes, 0=no
30.9.2024Added replyoption value 16 and 3116 returns credit note number and 31 returns all values
25.6.2024Adding new elementReplyoption parameter can now be used to return more aggregates in the response:

Invoice processing history entries
Accrual information
Factoring account name
Payment plan set for the incoice
20.6.2024Adding new elementAdded PaymentInterest element - late payment interest on invoice


Did you find it helpful? Yes No

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