Integration | HTTP-method | Resource | DTD | Schema | Example |
Get purchase order list | GET | purchaseorderlist.nv | Download | ||
Get purchase order | GET | getpurchaseorder.nv | Download | ||
Import purchase order | POST | purchaseorder.nv | purchaseorder.xsd | Download | |
Deleted purchase orders | GET | deletedpurchaseorders | |||
Get product quality list | GET | getproductqualitylist.nv | Download | ||
Import product qualities | POST | productquality.nv | productquality.xsd | Download | |
Get vendor | GET | getvendor.nv | |||
Import vendor | POST | vendor.nv |
Description | Schema |
Netvisor general types | netvisorgeneraltypes.xsd |
Purchase general types | purchasegeneraltypes.xsd |
Get purchase order list
Resource: purchaseorderlist.nv
Querystring parameters:
Parameter | 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 | Status of the order proposal = Purchase proposal approved = approved senttovendor = Sent to vendor waitinginvoice = Link delivery and invoice archived = Archived | approved |
searchcomment | 0...1 | Limit by comment or private comment | |
limitvendor | 0...1 | Identification type integer = treated as netvisor key organizationidentifier = treated as organization identifier other strings = treated as vendor code | 123456 |
lastmodifiedstart | 0...1 | Returns purchase orders that have been changed since the given date. Date is given as yyyy-MM-ddTHH:mm:ss | 2019-05-15T12:00:00 |
lastmodifiedend | 0...1 | Returns purchase orders that have been changed before the given date. Date is given as yyyy-MM-ddTHH:mm:ss | 2019-05-15T12:00:=0 |
Response:
Level | Element name | Type | Occurs | Description | Example |
root | Root | Aggr. | 1 | ||
1 | PurchaseOrderList | Aggr. | 1 | ||
2 | PurchaseOrder | Aggr. | 1 | ||
3 | NetvisorKey | String | 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 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
3 | OrderStatus | String | 1 | status of purchase order | approved |
3 | VendorName | String | 1 | Vendor | Netvisor Oy |
3 | Amount | Numeric | 1 | Amount | 1000,34 |
3 | Uri | String | 1 | Netvisor URI to the order | /getpurchaseorder.nv?netvisorkey=123 |
Get purchase order
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 | OrderDstatus | String | 1 | Purchase order state | proposal approved senttovendor archived |
2 | OrderDate | String | 1 | Purchase order date | 2017-1-1 |
2 | VendorName | String | 1 | Purchase order vendor | Oy Firma Ab |
2 | VendorAddressLine | String | 1 | Purchase order vendor address | Firmatie 1 |
2 | VendorPostNumber | Numeric | 1 | Purchase order vendor post number | 00100 |
2 | VendorCity | String | 1 | Purchase order vendor city | Helsinki |
2 | VendorCountry | String | 1 | Purchase order vendor country | Finland |
Attr. | type | String | 1 | Country type, always ISO-3166 | ISO-3166 |
2 | DeliveryTerm | String | 1 | Terms of delivery | Accordin to the agreement |
2 | DeliveryMethod | String | 1 | Delivery method | Installed |
2 | DeliveryName | String | 1 | Delivery name | Yritys Oy |
2 | DeliveryAddressLine | String | 1 | Delivery address | Yritystie 1 |
2 | DeliveryPostNumber | Numeric | 1 | Delivery post number | 00500 |
2 | DeliveryCity | String | 1 | Delivery city | Helsinki |
2 | DeliveryCountry | String | 1 | Delivery country | Finland |
Attr. | type | String | 1 | Country type, always ISO-3166 | ISO-3166 |
2 | PrivateComment | String | 1 | Internal comment, not shown on printed version, max. 1000 chars | |
2 | Comment | String | 1 | Comment, max. 1000 chars | Comment |
2 | OurReference | String | 1 | Our reference, max. 50 chars | Our reference |
2 | PaymentTerm | String | 1 | Payment term | 14 days net |
2 | Amount | Numeric | 1 | Final amount | 10000 |
Attr. | currencycode | String | 1 | Final amount currency | EUR |
Attr. | type | String | 1 | Currency code, always ISO-4217 | ISO-4217 |
2 | PurchaseOrderLines | Aggr. | 1 | ||
3 | PurchaseOrderProductDeliveryGroup | Aggr. | 1 | ||
4 | NetvisorKey | Numeric | 1 | Delivery Group NetvisorKey | 43 |
4 | ProductCode | String | 1 | Product code | Elycold1 |
4 | ProductName | String | 1 | Product name | Elycold1 |
4 | VendorProductCode | String | 1 | Vendor product code | Elycold1 |
4 | OrderedAmount | String | 1 | Ordered amout | 1 |
4 | UnitPrice | Numeric | 1 | Unit price | 8,39 |
4 | VatPercent | Numeric | 1 | Vat percent | 24 |
4 | LineSum | Numeric | 1 | Line sum | 8,39 |
4 | FreightRate | Numeric | 1 | Freight rate | 0 |
3 | PurchaseOrderProductLine | Aggr. | 1 | ||
4 | NetvisorKey | Numeric | 1 | Purchase order line Netvisor key | 1 |
4 | PurchaseOrderProductDeliveryGroupID | Numeric | 1 | Product delivery group ID | 43 |
4 | ProductCode | String | 0...1 | Product code | Elycold1 |
4 | ProductName | String | 0...1 | Product name, if product added from Netvisor productlist, in other case suppliers product name | Elycold1 |
4 | VendorProductCode | String | 0...1 | Vendor code | Elycold1 |
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 |
Attr. | format | String | 1 | Date type | ansi |
4 | ProductQuality | Aggr. | 0...1 | Product quality | |
Attr. | NetvisorKey | Numeric | 1 | Product quality NetvisorKey | 1 |
5 | QualityDescription | String | 1 | Product quality description | Best A class |
5 | QualityDeviation | String | 1 | Product quality deviation, true or false | False |
4 | InventoryPlace | String | 0...1 | Warehouse | Test warehouse |
4 | Dimension | Aggr. | 0...1 | ||
5 | DimensionName | String | 1 | Dimension name | Projects |
5 | DimensionItem | String | 1 | Dimension item | Project X |
4 | LinkedPurchaseInvoiceLines | Aggr. | 1 | ||
5 | PurchaseInvoice | Aggr. | 0...n | ||
6 | NetvisorKey | Numeric | 0...1 | Invoice Netvisor key | 156 |
6 | InvoiceNumber | Numeric | 0...1 | Invoice number | 3 |
6 | PurchaseInvoiceProductLines | Aggr. | 0...1 | ||
7 | NetvisorKey | Numeric | 0...1 | Invoice line Netvisor key | 238 |
3 | PurchaseOrderCommentLine | Aggr. | 0...1 | ||
4 | NetvisorKey | Numeric | 1 | Comment line ID | 1 |
4 | Comment | String | 1 | Order line comment | Free Text |
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 | String | 1 | Netvisor URI to invoice | /getpurchaseinvoice.nv?netvisorkey=1001 |
Import purchase order
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 | Format | Required | Description | Example |
method | String | Always | Add Import as new order Edit Edit an existing order | |
id | Numeric | If method is edit | ID of the order to edit |
Things to note 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 | Aggr. | 1 | ||
1 | purchaseorder | Aggr. | 1 | Main order information | |
2 | ordernumber | Integer | 1 | Number of the order | 141128 |
2 | orderstatus | String | 1 | Status of the order proposal - Purchase proposal approved - Approved senttovendor - Sent to vendor waitinginvoice - Link delivery and invoice archived - Archive | approved |
2 | orderdate | Date | 1 | Date of the order | 28.11.2014 |
Attr. | format | String | 1 | Format of the date, always ansi | ansi |
2 | vendoridentifier | String | 1 | Vendor identification information | 101714 |
Attr. | type | String | 1 | Identification type netvisor - Netvisor key code - Vendor code organisationidentifier - Vendor's organisation identifie | code |
2 | purchaseordervendordetails | Aggr. | 0...1 | Vendor details | |
3 | address | String | 1 | Vendor's address | |
3 | postnumber | String | 1 | Vendor's post number | |
3 | city | String | 1 | Vendor's post office | |
3 | country | String | 0...1 | Vendor's country's code | |
Attr. | 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 | purchaseorderdeliverydetails | String | 0...1 | Delivery details | |
3 | name | String | 0...1 | Recipient of the delivery | |
3 | address | String | 0...1 | Address of the delivery | |
3 | postnumber | String | 0...1 | Post number of the delivery | |
3 | deliverycity | String | 0...1 | Post office of the delivery | |
3 | deliverycountry | String | 0...1 | Country code of the delivery | |
Attr. | 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 |
Attr. | type | String | 1 | Type of the currency code, always ISO-4217 | ISO-4217 |
2 | purchaseorderpaymentterm | Aggr. | 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 | Aggr. | 0...1* | Order's product lines | |
3 | purchaseorderproductline | Aggr. | 0...n | Order's product line | |
Attr. | method | String | 0...1 | Product line method add - Add new line (default) edit - Edit line delete - Delete line partialdeliver - Partial delivery for line addtopartialdeliverygroup - Add new line for partial delivery group | add (read instructions above) |
Attr. | netvisorkey | Integer | 0...1* | ID of the product line | |
4 | purchaseorderproductlinepartialdelivery | Aggr. | 0...1 | Partial delivery information | |
5 | purchaseorderproductlinepartialdeliverycontent | Aggr. | 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 |
Attr. | 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 | 1 |
6 | inventorybatchnumber | Integer | 0...1 | Delivered product inventory batch number | 1234 |
6 | inventorymanufacturedate | Date | 0...1 | Delivered product's manufacture date | 2021-05-31 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
6 | inventorypackagingdate | Date | 0...1 | Delivered product's packaging date | 2021-06-01 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
6 | inventorybestbeforedate | Date | 0...1 | Delivered product's best before date | 2021-10-25 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
6 | inventoryexpirydate | Date | 0...1 | Delivered product's expiry date | 2021-10-25 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
4 | productcode | String | 0...1** | Product id, if type attribute not given, line can't be linked to product | 1017 |
Attr. | type | String | 0...1 | Type of indentifier netvisor -Netvisor Key customer - Product code | 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 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
4 | purchaseorderproductlinedeliverydetails | Aggr. | 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 | |
Attr. | 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 |
Attr. | type | String | 1 | Type of warehouse indentifier netvisor - Warehouse NetvisorKey customer - Name of the warehouse | netvisor |
4 | purchaseorderproductlinedimensions | Aggr. | 0...1 | Purchase order product line dimension details | |
5 | dimension | Aggr. | 0...n | Productline dimension | |
6 | dimensionname | String | 1 | Dimension header | Hankinta |
6 | dimensionitem | String | 1 | Dimension item | Tarvikkeet |
3 | purchaseordercommentline | String | 0...1 | Purchase order comment line | |
Attr. | method | String | 1 | Comment line method add - Add new line edit - Edit current comment delete - Delete line | |
Attr. | 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 |
Deleted purchase orders
Resource: deletedpurchaseorders.nv
Retrieves purchase orders that have been deleted since the given date. Purchase orders can be retrieved up to 7 days from the given date.
Querystring parameters:
Parameter | Occurs | Description | Example |
deletedsince | 1 | Mandatory parameter. Retrieves events that have been deleted since the given date. Events can be retrieved up to 7 days from the given date. | 2022-06-08 |
Response:
Level | Element | Type | Occurs | Description | Example |
root | root | Aggr. | 1 | ||
1 | DeletedPurchaseOrders | Aggr. | 1 | ||
2 | DeletedPurchaseOrder | Aggr. | 0...n | ||
3 | NetvisorKey | Numeric | 1 | Netvisor ID of purchase order | 5 |
3 | DeleteDate | Date | 1 | Delete date | 2022-06-08 15:14 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
Get product quality list
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 | String | 1 | Name of quality class | Hyvää tuotetta |
3 | NetvisorKey | Numeric | 1 | Netvisor ID of quality class | 1 |
3 | IsQualityDeviation | String | 1 | Is this handled as quality exeption | False |
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 | String | 1 | Will be handled as quality exeption | True or False |
2 | name | String | 1 | Name in Finnish (Default) | Hyvä laatu |
2 | name_en | String | 0...1 | Name in English | Good quality |
2 | name_se | String | 0...1 | Name in Swedish | God kvalitet |
Did you find it helpful? Yes No
Send feedback