In this article, you can find guidelines for how to use Visma.Net API Endpoints connected to the Customer Ledger from Visma.Net Financials. For more information regarding the endpoints, query parameters and other endpoints for all areas,
Please read the documentation found here: Swagger - Visma.Net Integrations Documentation
Supplier
Common usage example for Supplier(ScreenId=AP303000)
URL: https://integration.visma.net/API/controller/api/v1/Supplier
Methods:
GET All Suppliers
URL: https://integration.visma.net/API/controller/api/v1/Supplier
Example of usage with parameters
Query parameters:
lastModifiedDateTime=YYYY-MM-DD
As of today Filtering Parameters does not accept certain characters such as W-Z
These are the formats for Filtering
*2001-01-01
*2001-01-01 13:13:13
*2001-01-01 13:13:13.133
lastModifiedDateTimeCondition=Operator
Supported comparative operators for LastModifiedDateTime Conditions on filtering
> - Greater than
< - Less than
<= - Less than or equal to
>= - Greater than or equal to
Usage example:
This query will return suppliers updated on 2020-01-14 or later.
GET https://integration.visma.net/API/controller/api/v1/Supplier
?lastModifiedDateTime=2020-01-14
&l astModifiedDateTimeCondition=>=
( Lines are separated for readability)
POST Supplier
URL: https://integration.visma.net/API/controller/api/v1/Supplier
This example shows the minimum fields you should send to be able to post a new Supplier, if you are using automatic numbering you can omit the “number” field.
JSON Request body
{
"number": {
"value": "50002"
},
"name": {
"value": "NewSupplier"
},
"mainAddress": {
"addressId": 3001,
"addressLine1": "Testroad 5",
"postalCode": "0110",
"city": "OSLO",
"country": {
"id": "NO",
"name": "NORGE"
},
"county": {
"id": "0301",
"name": "OSLO"
}
},
"supplierClassId": {
"value": "1"
}
}
If sent successfully, the API will return:
Status 201 Created
Supplier Invoice
Common usage example for Supplier Invoice(ScreenId=AP301000)
URL: https://integration.visma.net/API/controller/api/v1/SupplierInvoice
Methods:
GET All Supplier Invoices
URL: https://integration.visma.net/API/controller/api/v1/SupplierInvoice
Example of usage with parameters
Query parameters:
Project=String
Will limit response to documents with the specified project
Usage example:
This will return Supplier Invoices with projectID 20.
GET https://integration.visma.net/API/controller/api/v1/customerDebitNote
?project=20
POST SupplierInvoice
URL: https://integration.visma.net/API/controller/api/v1/SupplierInvoice
This example shows the minimum fields you should send to be able to post a new Supplier Invoice, if you are using automatic numbering you can omit the “referenceNumber” field.
JSON Request body
{
"date": {
"value": "2019-11-08T00:00:00"
},
"documentType": {
"value": "Invoice"
},
"referenceNumber": {
"value": "000357"
},
"invoiceLines": [
{
"inventoryNumber": {
"value": "test*test"
},
"lineNumber": {
"value": "1"
},
"operation": "Insert",
"projectId": {
"value": "X"
},
"quantity": {
"value": 1
},
"subaccount": [
{
"segmentId": 1,
"segmentValue": "00"
}
],
"unitCostInCurrency": {
"value": "1.60"
},
"vatCodeId": {
"value": "1"
}
}
],
"paymentRefNo": {
"value": "test"
},
"postPeriod": {
"value": "112019"
},
"supplierNumber": {
"value": "50000"
},
"supplierReference": {
"value": "test"
}
}
If sent successfully, the API will return:
Status 201 Created
PUT PurchaseOrder
URL: https://integration.visma.net/API/controller/api/v1/SupplierInvoice/{debitNoteNumber}
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://integration.visma.net/API/controller/api/v1/SupplierInvoice/000050
JSON Request body
{
"lines": [
{
"operation": "Insert",
"lineNumber": {
"value": 1
},
"inventoryNumber": {
"value": "6"
},
"quantity": {
"value": 1
},
"unitPriceInCurrency": {
"value": 1
}
}
]
}
If successful, the API will return:
Status: 204 No Content
Purchase Order
Common usage example for Endpoint(ScreenId=PO301000)
URL: https://integration.visma.net/API/controller/api/v1/PurchaseOrder
Methods:
GET All Purchase Orders
URL: https://integration.visma.net/API/controller/api/v1/PurchaseOrder
Example of usage with parameters
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://integration.visma.net/API/controller/api/v1/purchaseorder
?Supplier=50000
&status=open
(Lines are separated for readability)
POST PurchaseOrder
URL: https://integration.visma.net/API/controller/api/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:
Status 201 Created
PUT PurchaseOrder
URL: https://integration.visma.net/API/controller/api/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://integration.visma.net/API/controller/api/v1/PurchaseOrder/25698
JSON Request body
{
"lines": [
{
"operation": "Update",
"lineNumber": {
"value": 1
},
"inventoryNumber": {
"value": "6"
},
"quantity": {
"value": 1
},
"unitPriceInCurrency": {
"value": 1
}
}
]
}
If successful, the API will return:
Status: 204 No Content
Supplier Payment
Common usage example for Endpoint(ScreenId=AP302000)
URL: https://integration.visma.net/API/controller/api/v1/SupplierPayment
Methods:
GET All Supplier Payments
URL: https://integration.visma.net/API/controller/api/v1/SupplierPayment
Example of usage with parameters
Query parameters:
SupplierId=String
This will limit the response to the provided SupplierId
Usage example:
This will return Purchase Orders registered on supplier “50000”
GET https://integration.visma.net/API/controller/api/v1/purchaseorder
?Supplier=50000
(Lines are separated for readability)
View full article