My Areas

Sign in to follow product and topic areas and get a shortcut in this menu
Visma eAccounting API
Showing results for 
Search instead for 
Did you mean: 
Recent topics

Hi, as per today, I am the one who has worked with both eA and API. The API:s mentioned are different, and if you would like to create a request to the "customers" endpoint, you will not be able to re-use the JSON. *By replicate I understood it as re-using the POST JSON file for both API:s Hope this answered your question, if not please let us know!
This post is a rendition of the main DOCUMENTATION. The eAccounting API exists on a sandbox server &lpar;; and also on the Production server &lpar;;. To test the API we recommend you to use the Sandbox environment. To be able to use the API you would need a Client ID, Client Secret, and a Redirect URI. Our API uses the OIDC framework, which in turn uses the OAuth2 protocol, we recommend you to get familiar with these. OAuth2 supports several “flows” or methods, but as for the eAccounting API, we only allow and support the server-side flow, AKA Authorization code flow. You can also check our MAIN DOCUMENTATION, here you can also register a sandbox client by yourselves. The authentication The authentication consists of the following steps: 1. GET an Authorization code: When you have your unique client ID, secret and redirect URI you can construct the following URL:<client_id>&redirect_uri=<redirect_uri>&scope=ea:api%20offline_access%20ea:sales&state=<state_string>&response_type=code&prompt=login&acr_values=service:44643EB1-3F76-4C1C-A672-402AE8085934+forceselectcompany:true <...> the angle brackets indicate where you should enter your unique values.* The example is based on authentication towards the Sandbox environment.* The State could be any random alphanumeric string.* Visiting the previous URL you will be prompted a Visma login window, after entering your credentials you will be redirected to your redirect URI page with the authorization code in the URL. 2. Use the Authorization code to make a POST request to receive an Access Token: Using the code received in the previous step, we can now make a POST request to the server in order to receive a Token. This POST request should look like this: HTTP Head POST HTTP/1.1 HTTP Headers Authorization: Basic base64&lpar;client_id:client_secret&rpar; Content-Type: application/x-www-form-urlencoded;charset=UTF-8 HTTP Body "grant_type=authorization_code&code=<authorization_code>&redirect_uri=<redirect_uri>" As a response, our server sends a JSON file to the server on which the redirect URI is hosted. This JSON file contains the Token, Refresh Token and expiry time. 3. Use the Token to GET/POST/DELETE resources: To make a request to, an example, GET Accounts Endpoint, the HTTP request should look like this: HTTP Head GET HTTP/1.1 HTTP Headers Authorization: Bearer <Access Token> Content-Type: application/x-www-form-urlencoded;charset=UTF-8 HTTP Body ….empty... 4. Use Token to GET a Refresh Token: An Access token is only valid for an hour, after that, you will have to get a new Access token, you can do this by going through the procedure we just went through or you can make a request using the refresh token. A request using the refresh token looks like this: HTTP Head POST HTTP/1.1 HTTP Headers Authorization: Basic base64&lpar;client_id:client_secret&rpar; Content-Type: application/x-www-form-urlencoded;charset=UTF-8 HTTP Body "grant_type=refresh_token&refresh_token=<refresh_token>" For more technical information visit the MAIN DOCUMENTATION.
Where to register bugs and requests
oData functionality is used to modify the size and objects you receive in your response JSON, it could be to reduce the amount of unused information or to increase speed of the response. NOTE! The oData functionality is only available on v2 of the API. For more information, check our main DOCUMENTATION, there is also a lot of resources on the internet about oData. According to the documentation found HERE, the filtering possibilities are the following for the eAccounting API: Pagination Filtering Selecting Sorting Combine several oData functions Pagination Pagination allows you to change the allowed page size for a JSON response, the standard is 50 objects. The suffix that you need to use for this function is: endpoint?$pagesize=<integer> An example using pagination when making a GET to the Accounts endpoint on the Sandbox environment with a page size of 1000:$pagesize=1000 Filtering Filtering allows you to filter by the information that is in each object in a JSON file. As an example, if you make a GET to the Accounts endpoint, you will receive all the accounts. But if you are interested in receiving only the ones that start with a specific number, then filtering is for you. There are several kinds of queries you could make here, here are a few examples. Suffixes that you can use:: endpoint?$filter=<property> condition <value> Example &lpar;“gt” is sjort for “greater than”&rpar;:$filter= Number gt 1337 endpoint?$filter=condition&lpar;<property>, <value>&rpar; Example:$filter=startswith&lpar;Number, ‘13’&rpar; endpoint?$filter=condition &lpar;<property>&rpar; condition <value> Example:$filter=length&lpar;Number&rpar; gt 4 Combined queries: endpoint?$filter=<property> condition <value> and/or <property> condition <value> Example:$filter= Number gt 1337 AND Number lt 2000 You can find the available conditions on our DOCUMENTATION page or on the internet. Selecting The Select function allows you to reduce the size of the JSON file you receive by only requesting the specific properties. The suffix that you need to use for this function is: endpoint?$select=<property1>, <property2>, <property3>, <property4> …. An example using the Select function for receiving only the Name and Number of the accounts when making a GET to the Accounts endpoint on the Sandbox environment:$select=Name, Number Sorting The sorting function allows you to sort the Objects in the JSON response by different properties. The suffix that you need to use is: endpoint?$orderby=<property> An example, sorting Accounts by Numbers:$orderby=Number Combine several oData functions It is possible to combine several of the above-mentioned oData functions in the same request. You can do this by adding an “&” between the functions. Example:$filter= Number gt 2000 AND Number lt 3000&$orderby=Number
As per today, there is no community area for the Advisor software. If you have any questions regarding the Advisor API, please contact the support at For documentation about the API visit the Advisor API site
Top Kudoed Authors
Top Solution Authors
Useful links

List of current integrations in: