Resource: purchaseorder.nv

HTTP-method: POST

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.
  • Payment term, delivery term and delivery method are searched with the given information, if not found, a new one is created

Querystring parameters: 

ParameterFormatRequiredDescriptionExample
methodStringAlwaysAdd Import as new order
Edit Edit an existing order

idNumericIf method is editID of the order to edit

Things to note when using Purchaseorderproductline:

MethodDescription
editIf used, do not include purchase order productline partial delivery information (purchaseorderproductlinepartialdelivery) and can include only elements which will be edited
deleteIf used, purchase order productline must be empty
partialdeliverUsed 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. 
addtopartialdeliverygroupUsed 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.
ParamateresDescription
netvisorkeyMandatory 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

LevelElementFormatOccursDescriptionExample
RootrootAggr.1  
1purchaseorderAggr.1Main order information 
2ordernumberInteger1Number of the order141128
2orderstatusString1Status of the order
proposal 
- Purchase proposal
approved - Approved
senttovendor - Sent to vendor
waitinginvoice - Link delivery and invoice
archived - Archive
approved
2orderdateDate1Date of the order28.11.2023
Attr.formatString1Format of the date, always ansiansi
2vendoridentifierString1Vendor identification information101714
Attr.typeString1Identification type
netvisor - Netvisor key
code - Vendor code
organisationidentifier - Vendor's organisation identifie
code
2purchaseordervendordetails
Aggr.0...1Vendor details
3
addressString1Vendor's address 
3postnumberString1Vendor's post number 
3
cityString1Vendor's post office 
3countryString0...1Vendor's country's code 
Attr.typeString1Country code's type, always ISO-3166 
2deliverytermString0...1Term of delivery 
2deliverymethodString0...1Method of delivery 
2purchaseorderdeliverydetails
String0...1Delivery details
3nameString0...1Recipient of the delivery 
3addressString0...1Address of the delivery 
3postnumberString0...1Post number of the delivery 
3
deliverycityString0...1Post office of the delivery 
3deliverycountryString0...1Country code of the delivery 
Attr.typeString1Type of the country code, always ISO-3166 
2privatecommentString0...1Free private comment text. Will not show on printed order 
2commentString0...1Free comment text, will show on printed order 
2ourreferenceString0...1Our reference1411281
2currencycodeString0...1Order's currency code USD
Attr.typeString1Type of the currency code, always ISO-4217
ISO-4217
2purchaseorderpaymenttermAggr.0...1Payment term information 
3netdaysInteger1Payment term net days14
3discountdaysInteger1Payment term cash discount days10
3discountpercentDecimal1Payment term discount percentage7,5
2purchaseorderlinesAggr.0...1*Order's product lines 
3purchaseorderproductlineAggr.0...nOrder's product line 
Attr.methodString0...1Product 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.netvisorkeyInteger0...1*ID of the product line
 
4purchaseorderproductlinepartialdeliveryAggr.0...1Partial delivery information
 
5purchaseorderproductlinepartialdeliverycontentAggr.1...nPartial delivery
 
6orderedamountDecimal1Amount of ordered products10,00
6deliveredamountDecimal1Amount of delivered products
5,00
6deliveryreceiveddateDate1Product delivery date2023-12-28
Attr.formatString1Date format, always ansiansi
6deliverymanuallyconfirmedString0...1Delivery manually confirmed, even if divergent amounttrue
or
false
6deliveredproductqualityInteger0...1Delivered product quality 1
6inventorybatchnumber
Integer0...1Delivered product inventory batch number
1234
6inventorymanufacturedate
Date0...1Delivered product's manufacture date2023-05-31
Attr.formatString1Date format, always ansi
ansi
6inventorypackagingdate
Date0...1Delivered product's packaging date2023-06-01
Attr.formatString1Date format, always ansi
ansi
6inventorybestbeforedate
Date0...1Delivered product's best before date2023-10-25
Attr.formatString1Date format, always ansi
ansi
6inventoryexpirydate
Date0...1
Delivered product's expiry date2023-10-25
Attr.formatString1Date format, always ansi
ansi
4productcodeString1**Mandatory, when purchaseorderproductline method = add. 
Product id, if type attribute not given, line can't be linked to Netvisor's product
1017
Attr.typeString0...1Type of indentifier
netvisor -NetvisorKey
customer - Product code
customer
4vendorproductcodeString0...1Supplier code for productTK100
4
vendorproductnameString0...1Supplier's product nameProduct100
4orderedamountDecimal0...1**Ordered amount of product10,00
4unitpriceDecimal0...1Product unit price, VAT excluded52,50
4vatpercentDecimal0...1**Product VAT percentage24
4freightrateDecimal0...1Shipping costs, freight rate22,50
4linecommentString0...1Line comment (max. 255 chars.) 
4deliverydateDate0...1**Product line product's delivery date2023-12-09
Attr.formatString1Date format, always ansiansi
4purchaseorderproductlinedeliverydetailsAggr.0...1Purchase order product line delivery details 
5deliveredamountDecimal1Received/Delivered product amount5,0
5deliveryreceiveddateDate1Received/Delivered delivery date 
Attr.formatString1Date format, always ansiansi
5deliverymanuallyconfirmedString0...1Delivery manually confirmed, even if divergent amounttrue
or
false
5deliveredproductqualityInteger0...1Quality of delivered product 
5
inventoryplaceString0...1ID/name of the used warehouse12
Attr.typeString1Type of warehouse indentifier
netvisor - Warehouse NetvisorKey
customer - Name of the warehouse
netvisor
5accountingsuggestionInteger0...1Suggestion for accounting account. Must be found in the system
4020
4purchaseorderproductlinedimensionsAggr.0...1Purchase order product line dimension details 
5dimensionAggr.0...nProductline dimension 
6dimensionnameString1Dimension headerHankinta
6dimensionitemString1Dimension item
Tarvikkeet
3purchaseordercommentlineString0...1Purchase order comment line 
Attr.methodString1Comment line method
add - Add new line
edit - Edit current comment
delete - Delete line
 
Attr.netvisorkeyInteger0...1ID of the commentline
Mandatory, if method
edit
or
delete
4commentString0...1Comment textThis is an order

Please note:

ElementMethodDescription
purchaseordercommentlinedeleteIf used, element purchaseordercommentline comment must be empty


Did you find it helpful? Yes No

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