Skip to content
Ole Melhus edited this page Oct 31, 2016 · 8 revisions

This is an unofficial API Client for Visma.net Integrations. The library is compatible with .net45, Xamarin.iOS and MonoAndroid.

How to install

  • Install Visma.net from the Nuget Package Manager
  • Open "Package Management Console", Install-Package Visma.net

Examples and documentation

Note that there are still some methods that are not async in the library. These methods, with some exceptions, will disappear before the release of v1.0.

  1. Step 1: Connecting with Visma.net
  2. Step 2: Customers
  3. Step 3: Customer Invoices
  4. Step 4: Create SalesOrder

Read-only with Dynamic

All endpoints are available as read-only by using the dynamic keyword. Use the documentation from Visma to find the available endpoints and fields.

Get all entities from an endpoint

int contextId = 123456;
string token = "b38e817c-d0f1-a034-b4c3-2959934a7b02";
dynamic vismaNet = new VismaNet(contextId, token);
var accounts = await vismaNet.Account.All();
foreach(var account in accounts){
  Console.WriteLine($"{account.accountCD}: {account.description}");
}

Get all entities with parameters

Parameters that are passed to the method All(), like numberToRead in this sample, will be passed as parameters to the endpoint.

int contextId = 123456;
string token = "b38e817c-d0f1-a034-b4c3-2959934a7b02";
dynamic vismaNet = new VismaNet(contextId, token);
var accounts = await vismaNet.Account.All(numberToRead: 5);
foreach(var account in accounts){
  Console.WriteLine($"{account.accountCD}: {account.description}");
}

Get a single entry

int contextId = 123456;
string token = "b38e817c-d0f1-a034-b4c3-2959934a7b02";
dynamic vismaNet = new VismaNet(contextId, token);
var account = await vismaNet.Account.Get("1920");
Console.WriteLine($"{account.accountCD}: {account.description}");