Capremill System AB
Visma Administration REST API
REST based web API enabling access to Visma Administration 500,1000 and 2000
Capremill Visma Adm Access API is a REST i based web API enabling access to Visma Administration
data over HTTP.
The API exposes one resource per entity type/table within the Visma Administration data model. For
example, the Orders table in Visma Administration is exposed via the URI /api/orders. All available
resources (about 80 in total) can be listed via the Swagger documentation by browsing
All operations (data retrieve and data manipulation) are performed via the Visma Administration
integration component (ADK). The ADK is an integration building tool provided by Visma. The tool
uses the same business logic as Visma Administration to validate data being added to the system via
1 Data retrieving
Data retrieving is performed using the HTTP GET method against a specific resource.
1.1 OData queries
When fetching data from the API you can specify what information you are interested in by using
OData queries. If you for example want to get the customer name for the customer with customer
number 123 you would use the following request:
/api/customers?$select=namn&$filter=kundNr eq ‘123’
1.1.1 Define properties/columns - $select
Specify the information you want to fetch using the OData query option $select and provide a
comma separated enumeration with the properties/columns of interest.
1.1.2 Define query filter - $filter
By using the OData query option $filter you are able to specify conditions that have to be met in
order to be part of the result set.
E.g. $filter=landKod in(‘SE’,’NO’) and datum1 gt 20190101 and startswith(namn, 'abc')
1.1.3 Include rows - $expand
Some entities (e.g. Order and Invoice etc) have a row collection associated to it (e.g. order-/invoice
rows). These entities have a property/column named rows, which can be expanded by using the
$expand OData query option. Within the expand clause you can then use the $select query option to
specify the properties you want to include for the rows, and it’s even possible use the $filter query
option if you’re only interested to receive rows where certain conditions are met.
Please notice that a filter within an expand clause only applies to that child (row) entity collection for
each parent entity (e.g. the order rows for each order) – it doesn’t narrow down the parent entity
result set (e.g. what orders that are returned).
E.g. $expand=rows($select=artnr;$filter=(antal1 le 10))
1.1.4 Ordering the result set - $orderby
In addition to the $select, $filter and $expand OData query options the API also supports ordering
(ascending or descending) the result set via the $orderby query option.
A complete example with the above examples for selecting, filtering and expanding, including
ordering by date would look like this:
/api/orders?$select=dokNr,fktTyp,datum1&$filter=landKod in(‘SE’,’NO’) and datum1 gt 20190101
and startswith(namn, 'abc')&$expand=rows($select=artnr;$filter=(antal1 le 10))&$orderby=datum1
2 Data manipulation
2.1 Create/update data [HTTP POST/PUT]
When creating new or updating existing entities/records in Visma via the API you provide the entity
to create or update in the request body. Use the HTTP POST method to create and the HTTP PUT
method to update. Provide only the properties/columns you explicitly want to set and default values
will be assigned to the rest according to Visma Administration business rules.
You are able to choose whether or not the resulting entity should be returned in the response.
2.2 Delete data [HTTP DELETE]
Deleting entities/records in Visma via the API is possible via the HTTP DELETE method. Please note
that all resources have the HTTP DELETE method, but some resources can’t be deleted due to Visma
Administration business rules. If you try to delete a record for a resource that can’t be deleted, you’ll
get an error message telling you so.
2.3 Primary keys
When performing an update or delete operation (HTTP PUT/DELETE) the primary key
property/properties must be set for each entity in the request body.