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 | - | ||
Import purchase invoice | POST | purchaseinvoice.nv | purchaseinvoice.dtd | Download | |
Update invoice status and post purchase invoice | POST | purchaseinvoicepostingdata.nv | purchaseinvoicepostingdata.dtd | Download | |
Import purchase order | POST | purchaseorder.nv | purchaseorder.dtd | purchaseorder.xsd | Download |
Get purchase order list | GET | purchaseorderlist.nv | Download | ||
Get purchase order | GET | getpurchaseorder.nv | Download | ||
Import vendor | POST | vendor.nv | |||
Get vendor | GET | getvendor.nv | |||
Import product qualities | POST | productquality.nv | productquality.xsd | Download | |
Get product quality list | GET | getproductqualitylist.nv | Download |
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 |
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 | Invoide date | 2013-10-23 |
Attr. | format | 1 | Format of InvoiceDate, Always ansi | ansi | |
3 | Vendor | Text | 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 | Text | 1 | Url that can be used to get details of invoice | /getpurchaseinvoice.nv?netvisorkey=123 |
Resource: getpurchaseinvoice.nv
Get detailed information of a specific purchase invoice.
Querystring parameters:
Parameter name | Occurs | Example | Description |
NetvisorKey | 1 | 123 | Netvisor key of the invoice to retrieve |
NetvisorKeyList | 0...1 | 1,2,3 | Can be used to get the details of several invoices with given id. Max. 500 identifiers |
Version | 0...1 | 2 | Used for returning single invoice line's dimension details inside the element (PurchaseInvoiceLine) |
Include | 0...1 | actions | - actions = What can be done to the invoice (approve, accept, reject, pay) |
Omitattachments | 0...1 | false | True = Exclude attachments False = Include attachments If parameter not given = True |
Response:
Level | Element Name | Type and length | Occurs | Example | Description |
Root | root | Aggr. | 1 | ||
1 | PurchaseInvoice | Aggr. | 1 | ||
2 | PurchaseInvoiceNumber | Text | 1 | 345 | Invoice number |
2 | PurchaseInvoiceDate | Date | 1 | 2013-10-23 | Invoide date |
Attr. | format | Text | 1 | ansi | Format of InvoiceDate, Always ansi |
2 | PurchaseInvoiceDeliveryDate | Date | 1 | 2013-09-10 | Delivery date |
Attr. | format | Text | 1 | ansi | Format of DeliveryDate, Always ansi |
2 | PurchaseInvoiceDueDate | Date | 1 | 2014-01-09 | Due date |
Attr. | format | Text | 1 | ansi | Format of DueDate, Always ansi |
2 | PurchaseInvoiceValueDate | Date | 1 | 2013-12-03 | Value date |
Attr. | format | Text | 1 | ansi | Format of ValueDate, Always ansi |
2 | PurchaseInvoiceReferencenumber | Text | 1 | 1234 | Reference number of invoice |
2 | PurchaseInvoiceAmount | Numeric | 1 | 1234,56 | Amount in two decimal accuracy |
2 | PurchaseInvoicePaidAmount | Numeric | 1 | 1000,00 | Paid amount in two decimal accuracy |
2 | ForeignCurrencyAmount | Numeric | 1 | 1234,56 | Amoun in foreign currency in two decimal accuracy |
2 | ForeignCurrencyNameID | Text | 1 | EUR | Currency code |
2 | InvoiceStatus | Text | 1 | open | Status of the invoice |
2 | PurchaseInvoiceOurReference | Text | 1 | Our reference | |
2 | PurchaseInvoiceYourReference | Text | 1 | Your reference | |
2 | PurchaseInvoiceDescription | Text | 1 | Invoice description | |
2 | VendorName | Text | 1 | Vendor Inc | Name of the vendor |
2 | VendorAddressline | Text | 1 | Pajukuja 5 | Address of the vendor |
2 | VendorPostnumber | Text | 1 | 53100 | Vendor post number |
2 | VendorTown | Text | 1 | Lappeenranta | Vendor city |
2 | VendorCountry | Text | 1 | FI | County code of the Vendor |
2 | VoucherID | Numeric | 0...1 | 1235 | Voucher's NetvisorKey |
2 | IsAccounted | Text | 1 | True | Is invoice accounted |
2 | PreviewImage | Text | 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 | Text | 1 | Invoice1234.pdf | File name of the attachment |
4 | ContentType | Text | 1 | Application/pdf | MIME-type of attachment content |
4 | Comment | Text | 1 | Comment text | |
2 | InvoiceLines | Aggr. | 0...1 | ||
3 | PurchaseInvoiceLine | Aggr. | 1...n | ||
4 | NetvisorKey | Text | 1 | Netvisor key | |
4 | LineSum | Numeric | 1 | Sum of the line | |
4 | UnitPrice | Numeric | 1 | Price of a single unit | |
4 | VatPercent | Numeric | 1 | VAT percent | |
4 | VatCode | Text | 1 | VAT code | |
4 | Description | Text | 1 | Description text | |
4 | Unit | Text | 1 | Unit of measurement | |
4 | OrderedAmount | Numeric | 1 | Amount of product ordered | |
4 | PurchasePrice | Numeric | 1 | Unit purchase price | |
4 | DeliveredAmount | Numeric | 1 | Amount of units delivered | |
4 | ProductCode | Text | 1 | Product identifier | |
4 | DiscountPercentage | Numeric | 1 | Discount percentage | |
4 | ProductName | Text | 1 | Name of the product | |
4 | PurchaseInvoiceDimensions | Aggr. | 0...1 | Levels 4 -5 -6 when version parameter is2 In other case levels 3-4-5 | |
5 | Dimension | Aggr. | 1...n | ||
6 | DimensionName | Text | 1 | Dimension | |
6 | DimensionDetailName | Text | 1 | Name of the dimension | |
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 | 123 | Number of purchase order |
4 | NetvisorKey | Numeric | 0...1 | 10 | 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 |
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 | Text | 1 | Date of invoice | Testimage.jpg |
3 | FileType | Text | 1 | image/png | |
3 | Content | text | 1 | Base64 encoded file | iVBORw0KGgoAAAANSUhEUgAAB |
Resource: purchaseinvoice.nv
An e-invoice transaction payment will be charged for each purchase invoice imported to Netvisor via API.
Proper attachments can not be imported for purchase invoice, an attachment is handled as a picture of the invoice. The content of the attachment has not been limited, though. Imported attachment is found in the purchase invoice view as a picture. Even though the DTD determines that more than one attachment can be included, in practice only the first one can be shown in the user interface. 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 | Example | Description |
Root | root | Aggr. | 1 | ||
1 | purchaseinvoice | Aggr | 1 | ||
2 | invoicenumber | Text | 1 | 12345 | Number of the invoice |
2 | invoicedate | Date | 1 | 2014-03-03 | Date of the invoice |
Attr. | format | Text | 1 | Date format, always ansi | |
Attr. | findopendate | Text | 0...1 | Only true is accepted | |
2 | invoicesource | Text | 0...1 | finvoice | Can be manual or finvoice |
2 | valuedate | Date | 0...1 | 2014-03-03 | Currently this is needed in order to import purchase invoices in despite of being marked optional in DTD |
Attr. | format | Text | 1 | Date format, always ansi | |
2 | duedate | Date | 1 | 2014-03-17 | Due date of the invoice |
Attr. | format | Text | 1 | Date format, always ansi | |
2 | purchaseinvoiceonround | Text | 0...1 | open | Defines the status of PurchaseInvoice. Can be open, approved or accepted |
Attr. | type | Text | 1 | netvisor | Type of status, default netvisor |
2 | vendorname | Text, max 250 | 0...1 | My Vendor | Name of the vendor |
2 | vendoraddressline | Text, max 80 | 0...1 | Address of the vendor | |
2 | vendorpostnumber | Text, max 50 | 0...1 | Post number of the vendor | |
2 | vendorcity | Text, max 50 | 0...1 | City of the vendor | |
2 | vendorcountry | Text, max 50 | 0...1 | FI | Country code of the vendor |
2 | vendorphonenumber | Text, max 80 | 0...1 | Vendor's phone number | |
2 | vendorfaxnumber | Text, max 80 | 0...1 | Vendor's fax number | |
2 | vendoremail | Text, max 80 | 0...1 | Vendor's E-mail address | |
2 | vendorhomepage | Text, max 80 | 0...1 | Vendor homepage | |
2 | amount | Numeric | 1 | 100,00 | Total of the invoice, this will be approximated to 2 decimals |
2 | accountnumber | Text | 0...1 | FI1000111234567 | Account number |
2 | organizationindentifier | Text | 0...1 | 123456-7 | Organiztion identifier |
2 | deliverydate | Date | 0...1 | 2014-03-03 | Invoice delivery date |
Attr. | format | Text | 1 | Date format, always ansi | |
2 | overduefinepercent | Numeric | 0...1 | overduefine percent | |
2 | bankreferencenumber | Text, max 70 | 0...1 | Bank reference | |
2 | ourreference | Text, max 200 | 0...1 | Our reference | |
2 | yourreference | Text, max 200 | 0...1 | Your reference | |
2 | currencycode | Text | 0...1 | GBP | Currency, currencycode and accountnumber must be given in order to have the exchange calculation done correctly |
2 | deliveryterms | Text, max 255 | 0...1 | Terms of delivery | |
2 | deliverymethod | Text, max 255 | 0...1 | Method of delivery | |
2 | comment | Text, max 255 | 0...1 | Comment | |
2 | checksum | Text | 0...1 | Checksum | |
2 | pdfextrapages | Numeric | 0...1 | ||
2 | readyforaccounting | Numeric | 0...1 | 1 | If given ( and invoices status is approved/accepted ), interface will approve / accept it and form a voucher for accounting |
2 | primaryvendormatchtype | Text | 0...1 | code | Possible to force vendormatch by value: |
2 | purchaseinvoicelines | Aggr. | 1 | ||
3 | purchaseinvoiceline | Aggr. | 1...n | ||
4 | productcode | Text, max 50 | 0...1 | 340 | Product code |
4 | productname | Text, max 200 | 1 | Test Product | Name of the product |
4 | orderedamount | Numeric | 0...1 | 12 | Amount ordered |
4 | deliveredamount | Numeric | 1 | 12 | Amount delivered |
4 | unitname | Text | 0...1 | Unit of measurement | |
4 | unitprice | Numeric | 1 | 3,81 | Price of a single unit |
4 | discountpercentage | Numeric | 0...1 | 1,52 | Discount percentage |
4 | vatpercent | Numeric | 1 | 24 | VAT percentage |
4 | linesum | Numeric | 1 | 45,72 | Total of the line, this will be approximated to 2 decimals |
Attr. | type | Text | 1 | brutto | Type of sum, default is brutto (gross) |
4 | description | Text, max 200 | 0...1 | Description text | |
4 | sort | Numeric | 0...1 | ||
4 | accountingsuggestion | Numeric | 0...1 | 4000 | If not given, default from company's default accounts will be used (based on vendor's country code) |
4 | dimension | Aggr. | 0...n | ||
5 | dimensionname | Text, max 50 | 1 | Project | Dimension header |
5 | dimensionitem | Text, max 200 | 1 | 8890 | Dimension name |
2 | purchaseinvoicecommentlines | Aggr. | 0...1 | ||
3 | purchaseinvoicecommentline | Aggr. | 1...n | ||
4 | comment | Text | 1 | Comment text | |
4 | Sort | Text | 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 | Text | 1 | MIME-type of the attachment | |
4 | attachmentdescription | Text | 1 | Description of the attachment | |
4 | filename | Text | 1 | The name of attached file | |
4 | documentdata | Text | 1 | In Base64 format |
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 is given with value 1 and leaving the element blank. 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 | Text | 1 | Purchase invoice status, in that order they can be given: | approved |
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 | Text, max 3000 | 0...1 | Comment of purchase invoice | Example comment |
3 | PurchaseInvoicePostingLine | Aggr. | 1...n | ||
4 | purchaseinvoicelinenetvisorkey | Numeric | 0...1 | Purchase invoice row NetvisorID | 12345 |
4 | ProductCode | Text | 0...1 | Product code | 123 |
4 | ProductName | Text | 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 | Text | 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 | |
attribuutti | vatcode | Text | 1 | VAT code | |
4 | LineSum | Numeric | 1 | Will be rounded to two decimals | |
attribuutti | type | Text | 1 | Only gross (brutto) | gross |
4 | Description | Text | 0...1 | Description | |
4 | Sort | 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 | Text, max 200 | 0...n | ||
5 | DimensionName | Text | 1 | Dimension header | |
5 | DimensionItem | Text | 1 | Dimension name |
Resource: purchaseorder.nv
Purchase orders can be imported over the API to Netvisor. Required information is order number, order date and vendor information. If product lines are included, product code and amount are required, and commentlines require the comment text.
Things to note:
- When editing an order, all existing product- and comment lines are not needed, give only edited and/or new data in the XML.
- Setting currency for a purchase order is not yet supported, any values entered into the currency or exchange rate attributes will not cause an error, but will be ignored for now.
- Payment term, delivery term and delivery method are searched with the given information, if not found, a new one is created
Querystring parameters:
Parameter | Type | Required | Description |
method | String | Always | Add Import as new order |
id | Integer | If method is edit | ID of the order to edit |
Things to not when using Purchaseorderproductline:
Method | Description |
edit | If used, do not include purchase order productline partial delivery information (purchaseorderproductlinepartialdelivery) and can include only elements which will be edited |
delete | If used, purchase order productline must be empty |
partialdeliver | Used for importing partial delivery rows. If used, must include at least two partial delivery rows (purchaseorderproductlinepartialdeliverycontent). In partial delivery information (purchaseorderproductlinepartialdeliverycontent) the amount of ordered products (orderedamount) must correspond to the ordered amount of the targeted productline amount, which was ordered. |
addtopartialdeliverygroup | Used for adding partial delivery rows. If used, must include at least one partial delivery row (purchaseorderproductlinepartialdeliverycontent). If editing erroneous amount of partially delivered product, you must add new partial delivery row for the rest of the amounts and update some partial delivery row amount with the delivered amount. Partially delivered product amount must correspond to the original purchase order line's product amount. |
Paramateres | Description |
netvisorkey | Mandatory if using other methods than add |
The following describes the XML message to import (POST) a purchase order into Netvisor:
When reading documentation:
* - When creating new purchase order, mandatory
** - When creating new product line, mandatory
Level | Element | Format | Occurs | Description | Example |
Root | root | Aggregate | 1 | ||
1 | purchaseorder | Aggregate | 1 | Main order information | |
2 | ordernumber | Integer | 1 | Number of the order | 141128 |
2 | orderstatus | String | 1 | Status of the order | approved |
2 | orderdate | Date | 1 | Date of the order | 28.11.2014 |
Attribute | format | String | 1 | Format of the date, always ansi | ansi |
2 | vendoridentifier | String | 1 | Vendor identification information | 101714 |
Attribute | type | String | 1 | Identification type | code |
2 | vendoraddressline | String | 1 | Vendor's address | |
2 | vendorpostnumber | String | 1 | Vendor's post number | |
2 | vendorcity | String | 1 | Vendor's post office | |
2 | vendorcountry | String | 0...1 | Vendor's country's code | |
Attribute | type | String | 1 | Country code's type, always ISO-3166 | |
2 | deliveryterm | String | 0...1 | Term of delivery | |
2 | deliverymethod | String | 0...1 | Method of delivery | |
2 | deliveryname | String | 0...1 | Recipient of the delivery | |
2 | deliveryaddressline | String | 0...1 | Address of the delivery | |
2 | deliverypostnumber | String | 0...1 | Post number of the delivery | |
2 | deliverycity | String | 0...1 | Post office of the delivery | |
2 | deliverycountry | String | 0...1 | Country code of the delivery | |
Attribute | type | String | 1 | Type of the country code, always ISO-3166 | |
2 | privatecomment | String | 0...1 | Free private comment text. Will not show on printed order | |
2 | comment | String | 0...1 | Free comment text, will show on printed order | |
2 | ourreference | String | 0...1 | Our reference | 1411281 |
2 | currencycode | String | 0...1 | Order's currency code | USD |
Attribute | type | String | 1 | Type of the currency code, always ISO-4217 | ISO-4217 |
2 | purchaseorderpaymentterm | Aggregate | 0...1 | Payment term information | |
3 | netdays | Integer | 1 | Payment term net days | 14 |
3 | discountdays | Integer | 1 | Payment term cash discount days | 10 |
3 | discountpercent | Decimal | 1 | Payment term discount percentage | 7,5 |
2 | purchaseorderlines | Aggregate | 0...1* | Order's product lines | |
3 | purchaseorderproductline | Aggregate | 0...n | Order's product line | |
Attribute | method | String | 0...1 | Product line method | add (read instructions above) |
Attribute | netvisorkey | Integer | 0...1* | ID of the product line | |
4 | purchaseorderproductlinepartialdelivery | Aggregate | 0...1 | Partial delivery information | |
5 | purchaseorderproductlinepartialdeliverycontent | Aggregate | 1...n | Partial delivery | |
6 | orderedamount | Decimal | 1 | Amount of ordered products | 10,00 |
6 | deliveredamount | Decimal | 1 | Amount of delivered products | 5,00 |
6 | deliveryreceiveddate | Date | 1 | Product delivery date | 2017.12.28 |
Attribute | format | String | 1 | Date format, always ansi | ansi |
6 | deliverymanuallyconfirmed | String | 0...1 | Delivery manually confirmed, even if divergent amount | true or false |
6 | deliveredproductquality | Integer | 0...1 | Delivered product quality | |
Attribute | type | String | 1 | Tyoe of quality | netvisor |
4 | productcode | String | 0...1** | Product id, if type attribute not given, line can't be linked to product | 1017 |
Attribute | type | String | 0...1 | Type of indentifier | customer |
4 | vendorproductcode | String | 0...1 | Supplier code for product | A100Ah |
4 | orderedamount | Decimal | 0...1** | Ordered amount of product | 10,00 |
4 | unitprice | Decimal | 0...1 | Product unit price, VAT excluded | 52,50 |
4 | vatpercent | Decimal | 0...1** | Product VAT percentage | 24 |
4 | freightrate | Decimal | 0...1 | Shipping costs, freight rate | 22,50 |
4 | linecomment | String | 0...1 | Line comment (max. 255 chars.) | |
4 | deliverydate | Date | 0...1** | Product line product's delivery date | 2017.12.9 |
Attribute | format | String | 1 | Date format, always ansi | ansi |
4 | purchaseorderproductlinedeliverydetails | Aggregate | 0...1 | Purchase order product line delivery details | |
5 | deliveredamount | Decimal | 1 | Received/Delivered product amount | 5,0 |
5 | deliveryreceiveddate | Date | 1 | Received/Delivered delivery date | |
Attribute | format | String | 1 | Date format, always ansi | ansi |
5 | deliverymanuallyconfirmed | String | 0...1 | Delivery manually confirmed, even if divergent amount | true or false |
5 | deliveredproductquality | Integer | 0...1 | Quality of delivered product | |
4 | inventoryplace | String | 0...1 | ID/name of the used warehouse | 12 |
Attribute | type | String | 1 | Type of warehouse indentifier netvisor - Warehouse NetvisorKey customer - Name of the warehouse | netvisor |
4 | accountingaccountsuggestion | Integer | 0...1 | Accounting account suggestion | 3000 |
4 | purchaseorderproductlinedimensions | Aggregate | 0...1 | Purchase order product line dimension details | |
5 | dimension | Aggregate | 0...n | Productline dimension | |
6 | dimensionname | String | 1 | Dimension header | Hankinta |
6 | dimensionitem | String | 1 | Dimension item | Tarvikkeet |
3 | purchaseordercommentline | 0...1 | Purchase order comment line | ||
Attribute | method | String | 1 | Comment line method add - Add new line edit - Edit current comment delete - Delete line | |
Attribute | netvisorkey | Integer | 0...1 | ID of the commentline | Mandatory, if method edit or delete |
4 | comment | String | 0...1 | Comment text | This is an order |
Please note:
Element | Method | Description |
purchaseordercommentline | delete | If used, element purchaseordercommentline comment must be empty |
Resource: purchaseorderlist.nv
Querystring parameters:
Paramter | Occurs | Description | Example | ||||||||||
limitstartordernumber | 0...1 | Export orders from number | 1000 | ||||||||||
limitendordernumber | 0...1 | Export orders up till number | 1100 | ||||||||||
limitbegindate | 0...1 | Export orders from date | 2018-01-01 | ||||||||||
limitenddate | 0...1 | Export orders up till date | 2018-06-30 | ||||||||||
limitorderstatus | 0...1 |
| approved | ||||||||||
searchcomment | 0...1 | Limit by comment or private comment | |||||||||||
limitvendor | 0...1 |
| 123456 |
Response:
Level | Element name | Type | Occurs | Description | Example |
root | Root | Aggr. | 1 | ||
1 | purchaseorderlist | Aggr. | 1 | ||
2 | purchaseorder | Aggr. | 1 | ||
3 | netvisorkey | Numeric | 1 | Netvisor key of purchase order | 123 |
3 | ordernumber | Numeric | 1 | Number of purchase order | 11228 |
3 | orderdate | Date | 1 | Date of purchase order | 2018-06-01 |
Attribute | format | Text | 1 | Date format, always ansi | ansi |
3 | orderstatus | Text | 1 | status of purchase order | approved |
3 | vendorname | Text | 1 | Vendor | Netvisor Oy |
3 | amount | Numeric | 1 | Amount | 1000,34 |
3 | uri | Text | 1 | Netvisor URI to the order | /getpurchaseorder.nv?netvisorkey=123 |
Resource: getpurchaseorder.nv
Fetch detailed information of certain purchaseorder.
Querystring parameters:
Parameter | Occurs | Description | Example |
netvisorkey | 1 | ID of the order to export | 123 |
NetvisorKeyList | 0...1 | Can be used to get the details of several orders with given id. Max. 500 identifiers | 1,2,3 |
Response:
Level | Element name | Type | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | purchaseorder | Aggr. | 1 | ||
2 | netvisorkey | Numeric | 1 | Purchase order Netvisor key | 1 |
2 | ordernumber | Numeric | 1 | Purchase order number | 1 |
2 | orderstatus | Text | 1 | Purchase order state | proposal approved senttovendor archived |
2 | orderdate | Text | 1 | Purchase order date | 2017-1-1 |
2 | vendorname | Text | 1 | Purchase order vendor | Oy Firma Ab |
2 | vendoraddressline | Text | 0...1 | Purchase order vendor address | Firmatie 1 |
2 | vendorpostnumber | Numeric | 0...1 | Purchase order vendor post number | 00100 |
2 | vendorcity | Text | 0...1 | Purchase order vendor city | Helsinki |
2 | vendorcountry | Text | 1 | Purchase order vendor country | Finland |
Attribute | type | Text | 1 | Country type, always ISO-3166 | ISO-3166 |
2 | deliveryterm | Text | 0...1 | Terms of delivery | Accordin to the agreement |
deliverymethod | Text | 0...1 | Delivery method | Installed | |
2 | deliveryname | Text | 0...1 | Delivery name | Yritys Oy |
2 | deliveryaddressline | Text | 0...1 | Delivery address | Yritystie 1 |
2 | deliverypostnumber | Numeric | 0...1 | Delivery post number | 00500 |
2 | deliverycity | Text | 0...1 | Delivery city | Helsinki |
2 | deliverycountry | Text | 1 | Delivery country | Finland |
Attribute | type | Text | 1 | Country type, always ISO-3166 | ISO-3166 |
2 | privatecomment | Text | 0...1 | Internal comment, not shown on printed version, max. 1000 chars | Internal comment |
2 | comment | Text | 0...1 | Comment, max. 1000 chars | Comment |
2 | ourreference | Text | 0...1 | Our reference, max. 50 chars | Our reference |
2 | paymentterm | Text | 0...1 | Payment term | 14 days net |
2 | amount | Numeric | 1 | Final amount | 10000 |
Attribute | currencycode | Text | 1 | Final amount currency | EUR |
Attribute | type | Text | 1 | Currency code, always ISO-4217 | ISO-4217 |
2 | purchaseorderlines | Aggr. | 1 | ||
3 | purchaseorderproductline | Aggr. | 1 | ||
4 | netvisorkey | Numeric | 1 | Purchase order line Netvisor key | 1 |
4 | productcode | Text | 0...1 | Product code | 123 |
4 | productname | Text | 0...1 | Product name, if product added from Netvisor productlist, in other case suppliers product name | Product |
4 | vendorproductcode | Text | 0...1 | Vendor code | 123 |
4 | orderedamount | Numeric | 1 | Ordered amount | 10 |
4 | deliveredamount | Numeric | 1 | Delivered amount | 0 |
4 | unitprice | Numeric | 1 | Unitprice | 100 |
4 | vatpercent | Numeric | 1 | VAT % | 24 |
4 | linesum | Numeric | 1 | Line sum | 100 |
4 | freightrate | Numeric | 0...1 | Freight rate | 0 |
4 | deliverydate | Date | 1 | Delivery date | 2017-01-01 |
Attribute | format | Text | 1 | Date type | ansi |
4 | inventoryplace | Text | 0...1 | Warehouse | Test warehouse |
3 | linkedpurchaseinvoices | Aggr. | 0...1 | Linked Purchaseinvoices | |
4 | purchaseinvoice | Aggr. | 1..n | ||
5 | invoicenumber | Numeric | 1 | Invoice number | 1001 |
5 | netvisorkey | Numeric | 1 | Invoice Netvisor key | 10 |
5 | uri | Text | 1 | Netvisor URI to invoice | /getpurchaseinvoice.nv?netvisorkey=1001 |
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 | Type | Occurs | Description |
method | Text | 1 | Add Add new vendor |
netvisorkey | Numeric | 0...1 | Vendor's NetvisorKey |
XML-message (POST-data):
Level | Element | Type | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | vendor | Aggr. | 1 | ||
2 | vendorbaseinformation | Aggr. | 1 | ||
3 | code | Text | 0...1 | Vendor code | 123 |
3 | name | Text | 1 | Vendor name | Testitoimittaja |
3 | address | Text | 0...1 | Adress | Toimittajakatu 1 |
3 | postcode | Text | 0...1 | Postal code | 00100 |
3 | city | Text | 0...1 | City | Helsinki |
3 | country | Text | 0...1 | County code | FI |
Attribuutti | type | Text | 1 | Type of county code | ISO-3166 |
3 | organizationid | Text | 0...1 | Business ID (Y-tunnus) | 123456-7 |
3 | groupname | Text | 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 | Text | 1 | Account number (IBAN) | FI7536359370000661 |
6 | bankname | Text | 1 | Bank name | Testipankki |
6 | isdefault | Text | 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 |
iban | Text | 1 | Account number (IBAN) | GB29NWBK60161331926819 | |
6 | bicswift | Text | 1 | BIC code | BUKBGB22 |
6 | bankname | Text | 1 | Bank name | Barclays |
6 | clearingcode | Text | 0...1 | Clearing code | |
6 | clearingnumber | Text | 0...1 | Clearing number | |
6 | bankaddresss | Text | 0...1 | Bank address | Bank Street 1 |
6 | country | Text | 1 | Country code | GB |
Attribuutti | type | Text | 1 | Country code type | ISO-3166 |
6 | currencycode | Text | 1 | Currency code | GBP |
Attribuutti | type | Text | 1 | Currency code type | ISO-4217 |
6 | isdefault | Text | 0...1 | Use as a default or not | False |
6 | includeaddresssinforeignpayments | Text | 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 | Text | 0...1 | Phone number | +35850123456 |
3 | Text | 0...1 | toimittaja@toimittajat.fi | ||
3 | faxnumber | Text | 0...1 | Fax | |
3 | contactpersonname | Text | 0...1 | Contact person's name | Timo Testaaja |
3 | contactpersonphonenumber | Text | 0...1 | Contact person's phone number | +35840987654 |
3 | contactpersonemail | Text | 0...1 | Contact person's email | timo.testaaja@toimittajat.fi |
3 | homepage | Text | 0...1 | Home page | |
3 | comment | Text | 0...1 | Comment | No comments |
2 | vendoradditionalinformation | Aggr. | 0...1 | ||
3 | defaultvatpercent | Numeric | 0...1 | Default VAT number | 24 |
3 | ispartialvatreduceprivileged | Text | 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 |
Attribuutti | type | Text | 1 | Currency code type | ISO-4217 |
3 | vendordimensions | Aggr. | 0...1 | Default dimensions | |
4 | dimension | Text | 1 | Dimension name | Kohde |
3 | vendoraccountingaccounts | Aggr. | 0...1 | Vendor accounting accounts | |
4 | vendoraccountingaccount | Aggr. | 1...n | ||
5 | accountnumber | Text | 1 | Account number | 4000 |
5 | isdefault | Text | 1 | Use as a default or not | True |
3 | vendoracceptancedetails | Aggr. | 0...1 | Acceptors | |
4 | vendoracceptancedetail | Aggr. | 1...n | ||
5 | acceptancename | Text | 0...1 | Acceptor name | Taaki Tarkastaja |
5 | isdefault | Text | 0...1 | Use as a default or not | False |
5 | isforced | Text | 0...1 |
Resource: getvendor.nv
Returns vendor information. For now, the NetvisorKey cannot be obtained via API, it should be stored when importing vendor.
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 | Type | Occurs | Description |
netvisorkey | Numeric | 1 | Vendor's NetvisorKey |
Response:
Level | Element | Type | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | vendor | Aggr. | 1 | ||
2 | vendorbaseinformation | Aggr. | 1 | ||
3 | code | Text | 0...1 | Vendor code | 123 |
3 | name | Text | 1 | Vendor name | Testitoimittaja |
3 | address | Text | 0...1 | Address | Toimittajakatu 1 |
3 | postcode | Text | 0...1 | Postal code | 00100 |
3 | city | Text | 0...1 | City | Helsinki |
3 | country | Text | 0...1 | County code | FI |
Attribuutti | type | Text | 1 | Type of county code | ISO-3166 |
3 | organizationid | Text | 0...1 | Business ID (Y-tunnus) | 123456-7 |
3 | groupname | Text | 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 | Text | 1 | Account number (IBAN) | FI7536359370000661 |
6 | bankname | Text | 1 | Bank name | Testipankki |
6 | isdefault | Text | 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 |
iban | Text | 1 | Account number (IBAN) | GB29NWBK60161331926819 | |
6 | bicswift | Text | 1 | BIC code | BUKBGB22 |
6 | bankname | Text | 1 | Bank name | Barclays |
6 | clearingcode | Text | 0...1 | Clearing code | |
6 | clearingnumber | Text | 0...1 | Clearing number | |
6 | bankaddresss | Text | 0...1 | Bank address | Bank Street 1 |
6 | country | Text | 1 | Country code | GB |
Attribuutti | type | Text | 1 | Country code type | ISO-3166 |
6 | currencycode | Text | 1 | Currency code | GBP |
Attribuutti | type | Text | 1 | Currency code type | ISO-4217 |
6 | isdefault | Text | 0...1 | Use as a default or not | False |
6 | includeaddresssinforeignpayments | Text | 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 | Text | 0...1 | Phone number | +35850123456 |
3 | Text | 0...1 | toimittaja@toimittajat.fi | ||
3 | faxnumber | Text | 0...1 | Fax | |
3 | contactpersonname | Text | 0...1 | Contact person's name | Timo Testaaja |
3 | contactpersonphonenumber | Text | 0...1 | Contact person's phone number | +35840987654 |
3 | contactpersonemail | Text | 0...1 | Contact person's email | timo.testaaja@toimittajat.fi |
3 | homepage | Text | 0...1 | Home page | |
3 | comment | Text | 0...1 | Comment | No comments |
2 | vendoradditionalinformation | Aggr. | 0...1 | ||
3 | defaultvatpercent | Numeric | 0...1 | Default VAT number | 24 |
3 | ispartialvatreducedprivileged | Text | 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 |
Attribuutti | type | Text | 1 | Currency code type | ISO-4217 |
3 | vendordimensions | Aggr. | 0...1 | Default dimensions | |
4 | dimension | Text | 1 | Dimension name | Kohde |
3 | vendoraccountingaccounts | Aggr. | 0...1 | Vendor accounting accounts | |
4 | vendoraccountingaccount | Aggr. | 1...n | ||
5 | accountnumber | Text | 1 | Account number | 4000 |
5 | accountname | Text | 1 | Account name | Ostot |
5 | isdefault | Text | 1 | Use as a default or not | True |
3 | vendoracceptancedetails | Aggr. | 0...1 | Acceptors | |
4 | vendoracceptancedetail | Aggr. | 1...n | ||
5 | acceptancename | Text | 0...1 | Acceptor name | Taaki Tarkastaja |
5 | isdefault | Text | 0...1 | Use as a default or not | False |
5 | isforced | Text | 0...1 |
Import product quality classes
Resource: productquality.nv
Quality resources will ONLY work if quality handling is activated in Netvisor. This concerns also purchaseorder.nv resource where you can define product quality.
Parameter | Occurs | Description | Example |
method | 1 | Add - add quality class | add |
Level | Element | Type | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | productquality | Aggr. | 1 | ||
2 | isqualitydeviation | Text | 1 | Will be handled as quality exeption | True or False |
2 | name | Text | 1 | Name in Finnish (Default) | Hyvä laatu |
2 | name_en | Text | 0...1 | Name in English | Good quality |
2 | name_se | Text | 0...1 | Name in Swedish | God kvalitet |
Resource: getproductqualitylist.nv
Quality resources will ONLY work if quality handling is activated in Netvisor. This concerns also purchaseorder.nv resource where you can define product quality.
Response:
Level | Element | Type | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | ProductQualities | Aggr. | 1 | ||
2 | ProductQuality | Aggr. | 1 | ||
3 | Name | Text | 1 | Name of quality class | Hyvää tuotetta |
3 | NetvisorKey | Numeric | 1 | Netvisor ID of quality class | 1 |
3 | IsQualityDeviation | Text | 1 | Is this handled as quality exeption | False |
Oliko tästä vastauksesta apua? Kyllä Ei
Send feedback