Purchase Order
URL: https://api.finance.visma.net/v1/PurchaseOrder
For information about the ERP logic behind Purchase Orders, please refer to the ERP Manual Help: Purchase orders
Methods
GET ALL Purchase Orders
URL: https://api.finance.visma.net/v1/PurchaseOrder
Query Parameters
Supplier=string
Lets you search for Purchase Orders registered to one supplier
orderStatus=string
Lets you define what orderStatuses to return, these are the Statuses of Purchase Order:
- On hold - The purchase order is a draft and can be edited manually.
- Open - The order was processed in accordance but has not been completed yet.
- Pending approval - The purchase order has not been approved by all the assigned persons.
- Rejected - The order was rejected by one of the persons assigned to approve it.
- Pending printing - Printing is required for the document but has not been performed yet.
- Pending e-mail - E-mailing is required for this document, but it has not been performed yet.
- Closed - All the ordered goods were received.
- Cancelled - The order was cancelled through the “ Cancel order” action - An order with this - status cannot be edited, and purchase receipts cannot be based on it.
Usage Example
This will return Purchase Orders registered on supplier “50000” that are in status OPEN.
GET https://api.finance.visma.net/v1/purchaseorder?Supplier=50000&status=open
POST Purchase Order
URL: https://api.finance.visma.net/v1/purchaseorder
This example shows the minimum fields you should send to be able to post a new Purchase Order, if you are using automatic numbering you can omit the “referenceNumber” field.
JSON Request body
{
"orderType": {
"value": "RegularOrder"
},
"date": {
"value": "2019-12-27T09:46:11.202Z"
},
"supplier": {
"value": "50000"
},
"lines": [
{
"operation": "Insert",
"inventory": {
"value": "teststock"
},
"lineType": {
"value": "GoodsForInventory"
},
"warehouse": {
"value": "2"
},
"uom": {
"value": "PALL"
},
"orderQty": {
"value": 2
},
"unitCost": {
"value": 2000
}
}
]
}If sent successfully, the API will return:

PUT Purchase Order
URL: https://api.finance.visma.net/v1/purchaseorder/{purchaseOrder}
When using PUT, you only send the fields you want to update. In the below example, we update the first line of the Credit Note:
URL
PUT https://api.finance.visma.net/v1/supplierInvoice/000050'
JSON Request body
{
"lines": [
{
"operation": "Update",
"lineNumber": {
"value": 1
},
"inventory": {
"value": "6"
},
"orderQty": {
"value": 1
}
}
]
}If successful, the API will return:
