How to integrate with Visma e-conomic: From two tokens to the first read and write
Visma e-conomic is integrated through two APIs with one authentication: the versioned OpenAPIs and an older REST API. You register an app, each customer grants it access to their agreement and every request sends two tokens in its headers. This guide covers each step in order: the two APIs, authentication, GET /self, reading, filtering, writing, rate limits, webhooks and production access.


OpenAPI and REST, the two APIs of Visma e-conomic
Visma e-conomic offers two RESTful APIs that exchange JSON. OpenAPI is its newer suite of APIs, each described by an OpenAPI specification. REST is the older API. e-conomic keeps it in a feature freeze: existing functionality is maintained, and new functionality is added only on OpenAPI.
e-conomic’s guidance is that integrations should be OpenAPI-first. Where a function is available only through REST, its help article says it is “perfectly fine to use REST alongside OpenAPI”. Both APIs use the same authentication, so one integration can call both.
OpenAPI https://apis.e-conomic.com/{resource-api}/v{major version}.{minor version}.{patch version}/{resource-name}REST https://restapi.e-conomic.comcurl -H "X-AppSecretToken: demo" -H "X-AgreementGrantToken: demo" \https://apis.e-conomic.com/customersapi/v3.1.0/Customers
With the value demo for both tokens, the demo agreement allows GET requests only. In the OpenAPIs the version is part of every URL.
The OpenAPIs are separate APIs. The documentation index of the developer site lists 14 of them, among them Customers, Suppliers, Accounts, Journals, Products and Webhooks. Each has its own version number with a major, a minor and a patch part, and e-conomic asks you to configure the specific version in each call. A breaking change increments the major version.
e-conomic gives two different figures on two pages for how long the previous major version remains supported. The help article says “at least 12 months” and the Developer Terms say “a maximum of 12 months”. Both make the transition to the latest version the partner’s responsibility.
The REST API has no versioning. Its home resource lists each endpoint as stable, experimental or deprecated.
Which objects can be read and written through maesn is listed on the Visma e-conomic API page. Visma eAccounting is a separate product of the Visma group with an API of its own, which is covered on our Visma eAccounting API page.
GET /self, the request e-conomic recommends as the first one of an integration, is currently available only in the REST API. An OpenAPI-first integration therefore still sends it to the REST API, with the same two tokens.
The two APIs and the feature freeze from e-conomic’s page on choosing an API and its help article on the same question, the URL format, the versioning and the demo agreement from its OpenAPI documentation, the endpoint states from its REST documentation and the second figure from its Developer Terms, checked 16 November 2026.
Authenticating with an app secret token and an agreement grant token
Visma e-conomic authenticates with two tokens that form a combined key. The app secret token is your part of the key and identifies your app. The agreement grant token gives your app access to the accounting data of the e-conomic user who granted it.
e-conomic works with two kinds of agreement. Accounting data lives on an accounting agreement, and apps are managed in a developer agreement, which contains no accounting data.
e-conomic’s connection guide describes the setup in four steps:
- A developer agreement. You sign up for it on e-conomic’s developer site, free of charge, and use it to manage your apps.
- An app with a role. You create the app in the developer agreement and select a role for it. The app secret token is displayed once, and you can generate a new one with a reset.
- The grant by your customer. An accounting user opens the installation URL of your app and grants it access. The result is an agreement grant token for that agreement.
- The two tokens in the headers. Requests to both APIs send
X-AppSecretTokenandX-AgreementGrantToken.
GET /self HTTP/1.1Host: restapi.e-conomic.comX-AppSecretToken: <app secret token>X-AgreementGrantToken: <agreement grant token>Content-Type: application/json
e-conomic accepts the tokens in request headers only. Authentication through URL parameters is not supported.
The agreement grant token can be collected automatically. If you enter a redirect URL for the app in the developer agreement, e-conomic redirects the user’s browser to that address after the grant and passes the token in a URL parameter named token. The language of the installation pages is set with the parameter locale, which accepts da-DK or en-US.
The tokens have no expiry time. According to e-conomic’s post on token authentication, they “need only be generated once and do not have a TTL”. A user revokes the access inside e-conomic, under All Settings, Extensions and Apps, and a request with a revoked grant returns HTTP 401.
The role of the app limits which data it can access. e-conomic currently lists the roles Superuser, Bookkeeping, Sales and Project employee. The path /customers, for example, is accessible to Superuser and Sales, and so is /self. /accounts is accessible to Superuser and Bookkeeping. A request outside the role of the app returns HTTP 403.
The two tokens, the four steps, the headers and the redirect from e-conomic’s connection guide, the roles from its page on role-based permissions, the missing expiry and the revocation from its post on token authentication, both status codes from its OpenAPI documentation, checked 16 November 2026.
What GET /self tells you about the connected agreement
GET /self returns information about the connection: the agreement, the company, the subscription plan, the app and its roles. e-conomic recommends calling it immediately after obtaining an agreement grant token, before any other request.
The reason is that the agreement grant token does not identify the agreement that granted access. The response contains agreementNumber and, in the object company, the fields name and companyIdentificationNumber, so your integration can verify that the customer connected the intended agreement. Store the agreement number together with the grant token.
GET https://restapi.e-conomic.com/self{"agreementNumber": 1583064,"agreementType": {"agreementTypeNumber": 1,"name": "denmark","subscriptionPlanLevel": "internal"},"company": {"name": "Demo Company","companyIdentificationNumber": "00052507"},"application": {"appNumber": 3162,"name": "REST Demo App","requiredRoles": [{ "roleNumber": 2, "name": "SuperUser" }]},"modules": [{ "moduleNumber": 4, "name": "Projektstyring" }]}
modules lists the modules the company has active, and requiredRoles the roles of the app. Both arrays are shortened to one entry here.
The field subscriptionPlanLevel shows whether your integration can write. According to e-conomic, internal agreement types and agreements on the Basis subscription support only read operations through the public API. Plus and above support create, read, update and delete.
- Internal agreement types
- Read-only
- Basis
- Read-only
- Plus and above
- Create, read, update and delete
Check the plan level during onboarding. GET /self returns it in the field subscriptionPlanLevel, so the integration can check before the first write whether the agreement supports it.
A write to a read-only agreement returns HTTP 403 with the title “The license is read-only.” e-conomic therefore suggests checking the plan level during onboarding.
e-conomic’s Danish help article for customers goes further. It names a subscription without API access, probably Basis, as the typical cause of an error message about missing API access, and it requires an upgrade to at least a Plus package.
The response also contains application.appNumber, which identifies the installed app. e-conomic names the separation of production and sandbox environments as one use for it and asks you to share the app number when you contact its API support.
If GET /self returns HTTP 401 with the message “Token does not correspond to a valid grant.” and the error code E02250, common reasons include an invalid token, a stored grant that is no longer valid or an app that has been removed from the agreement. e-conomic’s guidance is to stop using the stored agreement grant token and to let the customer connect the app again.
Purpose, fields, plan levels and both error responses from e-conomic’s help article on GET /self, the missing API access from its Danish help article on API access and the example from its demo agreement, checked 16 November 2026.
Reading customers with cursor-based pagination
e-conomic exposes its data as collections of items. Each item has one property that is its unique identifier, and a single item is read with that identifier. A collection is read with filtering, sorting and pagination.
The example reads the customers of an agreement through the Customers API. The endpoint for all customers returns up to 1.000 items per request, together with a cursor for the next request.
GET https://apis.e-conomic.com/customersapi/v3.1.0/Customers{"cursor": "<cursor>","items": [{"customerNumber": 1,"customerGroupNumber": 1,"zone": 1,"currency": "DKK","name": "<customer name>","paymentTermId": 1,"objectVersion": "f3ea6b50f1b8722e"}]}GET https://apis.e-conomic.com/customersapi/v3.1.0/Customers?cursor=<cursor>
The item is shortened to seven properties, with the values of the demo agreement except the name. When a response contains no cursor, all items have been retrieved.
The cursor is the identifier of the first item of the next set. It does not state how many items remain.
The second approach is classic pagination, which has endpoints of its own. You add /paged to the URL and send the parameters skippages and pagesize. Without parameters the endpoint returns 20 items, and the page size can be increased to 100.
- Reaches
- The whole collection
- Items per request
- Usually 1.000
- Sorting
- Not supported
- Reaches
- The first 10.000 items
- Items per request
- 20 by default, up to 100
- Sorting
- Supported
Use the cursor to read a collection completely. e-conomic recommends cursor-based pagination by default and classic pagination only for apps that load pages into a list or a table.
e-conomic recommends cursor-based pagination by default, because it is faster and works for collections of any size. Classic pagination is limited to 10.000 items, and items beyond that limit are not returned. It is meant for apps that load pages into a list or a table.
The total number of items comes from a third endpoint. In the Customers API it is /Customers/count.
The REST API paginates with skippages and pagesize on the collection itself. It returns 20 resources by default and up to 1.000 with the parameter. Each response contains a pagination object with links for navigation, such as firstPage, nextPage and lastPage.
Collections, both pagination approaches and their limits from e-conomic’s OpenAPI documentation, the endpoints of the example from the specification of its Customers API, the pagination of the REST API from its REST documentation, checked 16 November 2026.
Filtering, sorting and the lastUpdated property
Filters are sent in the query parameter filter. A filter consists of predicates, and each predicate has a property name, an operator and a value. Both APIs use this syntax. Filtering on strings is case insensitive, and e-conomic asks you to URL-encode filter strings.
?filter=name$eq:Joe?filter=name$eq:Joe$and:city$like:*port?filter=name$eq:Joe$and:(city$like:*port$or:age$lt:40)?filter=lastUpdated$gt:2024-02-24
$and: and $or: chain predicates, and parentheses control their order. Without wildcards, $like: matches the value anywhere in the string. The property names are those of the examples in the documentation.
| Operator | Syntax |
|---|---|
| Equals | $eq: |
| Not equals | $ne: |
| Greater than | $gt: |
| Greater than or equal | $gte: |
| Less than | $lt: |
| Less than or equal | $lte: |
| Substring match | $like: |
| In | $in: |
| Not in | $nin: |
| And also | $and: |
| Or else | $or: |
Filtering is enabled on all collection endpoints but not on all properties. In the OpenAPI specifications, a property that allows filtering has the extension x-filterable with the operators it accepts.
In the Customers API, for example, customerNumber accepts eq, ne, lt, lte, gt, gte, in and nin. A filter on a property that does not allow it returns HTTP 400.
Sorting uses the parameter sort with a property name, and a minus sign in front of the name reverses the direction. In the OpenAPIs sorting is available only with classic pagination, because a cursor points to a record in a fixed ordering.
For reading only what has changed, e-conomic provides the property lastUpdated. It contains the date on which a resource was last updated, or the creation date if nothing has changed since. A filter such as lastUpdated$gt:2024-02-24 returns the resources updated since that date.
e-conomic adds that not all resources have the property. On sales documents it can also be modified by a change to a different model: when an invoice line is created, lastUpdated on the invoice changes as well.
For customers, the two APIs differ in where the property is available. In version 3.1.0 of the Customers API, the schemas Contact and DeliveryLocation include it. The schema of the customer itself does not. For customers, the REST API provides the property: it is one of the filterable properties of /customers.
Filter syntax, operators, sorting and the property lastUpdated from e-conomic’s OpenAPI documentation, the properties of the Customers API from its specification, the filterable properties of the REST endpoint from its REST documentation, checked 16 November 2026.
Creating a customer and updating it with an object version
A create is a POST to the collection, in both APIs. The example creates a customer through the REST API, because its documentation lists the required properties of the request: currency, customerGroup, name, paymentTerms and vatZone.
POST /customers HTTP/1.1Host: restapi.e-conomic.comX-AppSecretToken: <app secret token>X-AgreementGrantToken: <agreement grant token>Content-Type: application/json{"name": "Example Customer ApS","currency": "DKK","customerGroup": { "customerGroupNumber": 1 },"paymentTerms": { "paymentTermsNumber": 1 },"vatZone": { "vatZoneNumber": 1 }}
If the request contains no customerNumber, e-conomic assigns one. A successful create returns HTTP 201 with the created resource in the body and a Location header with its link.
Three of the required properties refer to master data of the agreement: a customer group, payment terms and a VAT zone. The REST API offers the collections /customer-groups, /payment-terms and /vat-zones to read their numbers.
If the data fails validation, the REST API rejects the request with HTTP 400. The response follows the structure of the request: each property that failed contains an errors array with an error code, a message and a developer hint, or a subset of these.
{"message": "Validation error.","developerHint": "Inspect validation errors and correct your request.","httpStatusCode": 400,"errors": {"currency": {"errors": [{"errorCode": "E06000","message": "currency does not exist.","value": "ZUL","developerHint": "Find a list of currencies at https://restapi.e-conomic.com/currencies."}]}}}
The example is from a request that creates a draft invoice. The valid properties are removed from the response, so it contains only the properties to correct.
An update is a PUT. In the REST API a PUT overwrites the full object and must include the full entity. Its documentation states that the API has no PATCH support on JSON documents. A documented exception is PATCH /customers/:customerNumber, which changes the property eInvoicingDisabledByDefault.
In the OpenAPIs an update also contains the objectVersion of the item. A GET returns the value and the PUT sends it back. If the item was modified in between, the PUT fails with HTTP 409 Conflict, and the integration retrieves the item again before it repeats the update. In the Customers API a successful PUT /Customers/{number} returns HTTP 204.
For retries after a network failure, both APIs accept the optional header Idempotency-Key with a unique value of your own. A repeated request with the same key returns the original response from a cache, marked with the response header X-ResultFromCache.
The cache covers one hour, and the header cannot be used with GET requests. Your application generates the keys and keeps track of them.
Invoices are written in two steps in the REST API. POST /invoices/drafts creates a draft invoice, and POST /invoices/booked books a draft. While an invoice is a draft, everything in it can be edited. Once it is booked, it can no longer be edited.
The required properties of a draft invoice are currency, customer, date, layout, paymentTerms and recipient, with recipient.name and recipient.vatZone.
Required properties, the validation error, PUT and the two invoice steps from e-conomic’s REST documentation, the object version from its OpenAPI documentation, the idempotency key from both, the status codes of the update from the specification of its Customers API, checked 16 November 2026.
Rate limits as a token bucket with a cost per call
e-conomic limits requests with a token bucket algorithm. A bucket holds a number of tokens, each request consumes some of them and the bucket is refilled at a fixed rate. Your app receives a separate bucket for each agreement it serves, so every connected customer has a budget of its own.
The number of tokens a request consumes is its call cost, and it depends on the endpoint. e-conomic gives a capacity of 2.000 tokens and a refill rate of 30 tokens per second as examples and does not state them as fixed values.
| Approximate cost | Request |
|---|---|
| 1 token | GET /accounts/{accountNumber} |
| 5 tokens | GET /self |
| 13 tokens | GET /invoices/booked/{bookedinvoicenumber} |
Response headers report the state of the bucket. X-CallCost contains the tokens the request consumed, and X-RateLimiting the remaining tokens against the total. On the demo agreement, GET /self returned an X-CallCost of 5 on the day of checking, and the list of customers in the Customers API returned 3.
When the bucket is empty, requests are rejected with HTTP 429 Too Many Requests until it refills. The response contains the header Retry-After with the number of seconds to wait. e-conomic asks you to use that value and to fall back to exponential backoff without it: 1 second, then 2, then 4, up to a maximum wait time.
e-conomic also recommends sending requests sequentially, one at a time, because parallel requests can exhaust the bucket rapidly. A request with an Idempotency-Key that the server already knows costs 0 tokens and is not affected by rate limiting.
Algorithm, scope, call costs, headers and recommendations from e-conomic’s help article on rate limiting, the two measured values from its demo agreement, checked 16 November 2026.
How webhooks work, from event types to retries
A webhook is an HTTP POST request that e-conomic sends to a URL you define when a resource changes, for example an invoice or a product. Webhooks are set up in e-conomic’s interface or through the Webhooks API, which belongs to the OpenAPIs and requires the role SuperUser. Its changelog dates version 1.0.0 to 1 March 2026.
The endpoint GET /EventTypes lists the event types. On the day of checking it returned 20 types: INVOICE_BOOKED, JOURNAL_BOOKED and 18 types that end in _UPDATED, among them CUSTOMER_UPDATED, SUPPLIER_UPDATED and PRODUCT_UPDATED. No type in the list has CREATED or DELETED in its name.
POST https://apis.e-conomic.com/webhooksapi/v1.0.0/webhooks{"eventType": "CUSTOMER_UPDATED","name": "Customer synchronisation","url": "https://app.example.com/webhooks/e-conomic","contentType": "application/json","postData": "{\"old\": \"[OLDNUMBER]\", \"new\": \"[NEWNUMBER]\"}"}
postData is the payload of the request e-conomic sends, with up to 4.000 characters. It can contain the merge fields of the event type, which for CUSTOMER_UPDATED are [OLDNUMBER] and [NEWNUMBER].
The content of a notification is the payload you defined. Further data of the changed resource is read with a request to the API.
Each app can have one webhook per event type and agreement, and the URL has to use HTTPS. A webhook can send up to 5 custom headers that you define. The Webhooks API returns only the webhooks that were created by the same app, so webhooks a user created in e-conomic’s interface are not included.
e-conomic sends one request per changed resource and does not bundle them, so a bulk change triggers as many requests as resources were changed. It recommends adding incoming events to a queue.
A failed request, which is a connection error or a status code outside the 2xx range, is retried up to 5 times: after 1 second, 20 seconds, 1 minute, 5 minutes and 20 minutes.
If more than 250 requests to a webhook URL have failed in the last 24 hours, the webhook is disabled, and events are not queued while it is disabled.
e-conomic’s webhook guide advises against relying on webhooks alone and recommends a nightly synchronisation job that catches missed webhooks. The Developer Terms set rules for stored data, which the next section covers.
How webhooks differ between ERP and accounting systems is the subject of our article on webhooks in ERP and accounting.
Definition, retries and the recommendation from e-conomic’s guide to working with webhooks, the properties and limits of a webhook from the specification of its Webhooks API, the visibility of webhooks from its post on the Webhooks API, the event types from its demo agreement, checked 16 November 2026.
From a trial agreement to production access
A developer agreement contains no accounting data, so tests need an accounting agreement. e-conomic offers a free 14-day trial, with demo data or blank, and extends the period on request. Its Developer Terms also describe a sandbox environment with synthetic data and call it planned.
The Developer Terms call access to customer data production access and name these conditions for it:
- A registered company. Production access is granted only to professional entities with a valid CVR number or an equivalent foreign business registration.
- Identification. When requesting production access, the developer is verified via MitID, BankID, eID or passport.
- A declaration of purpose. It describes the functionality of the application, its data processing and the purpose of the integration, and access to the API is limited to that purpose.
- An installation limit. In production an application starts with a quota of 20 installations. At 10 installations the developer receives a notification, and at 20 new installations are disabled until e-conomic has manually verified the application. Existing installations continue to work.
According to the terms, e-conomic charges no fees for access to the API development environment and reserves the right to introduce fees for API access with 60 days’ notice.
The terms also regulate the storage of data. Temporary caching is permitted only to optimise application performance and to minimise unnecessary API load, and cached data must not be stored permanently. Building a parallel database or register that functions independently of e-conomic is prohibited.
In place of scheduled, automated bulk updates, the terms require cached data to be purged or refreshed based on actual user activity.
A listing in e-conomic’s app market is a separate step. The required modules in the app settings apply only to apps that are headed to the market, and the app partner page, which is in Danish, offers a contact form for developers who want to be listed.
The trial from e-conomic’s connection guide, the conditions for production access, the fees and the storage rules from its Developer Terms, the listing from its app partner page, checked 16 November 2026.
Visma e-conomic through maesn: What the Unified API handles for you
The sections above describe what a direct integration implements for one system. Through maesn you reach Visma e-conomic with the same API and the same common data model as every other supported system, and these parts are handled on our side:
- The two tokens. You create the app in your e-conomic developer agreement, enter the redirect URL of maesn and submit the app secret token to us. The agreement grant token of each customer is obtained when the customer connects and is stored with the connection. Your requests then identify the connection with an account key.
- Pagination. Lists are read through one paged interface with page sizes of 5, 10, 20, 50 and 100.
- Change detection. One filter returns the customers, suppliers, accounts, journals and journal entries that are new or changed since a timestamp, in the same form as for the other systems you connect.
- Idempotent writes. For Visma e-conomic, the maesn API supports an idempotency key when you create journal entries and booking proposals. A repeated request with the same key returns the stored response and creates no duplicate. The idempotency page describes the header.
What stays in your product is the app itself. It is registered in your developer agreement, and production access under e-conomic’s Developer Terms is requested for it.
The handling of rate limits stays in your product as well: a rate-limited request returns HTTP 429 to your application, and the retry with backoff is implemented in your application.
The subscription plan stays with your customer: e-conomic decides by the plan of the agreement whether data can be written through its public API.
How errors are returned through the unified interface is described on the unified error handling page.
Frequently asked questions
How does an accounting firm grant an app access as an administrator?
How can I see which customers have granted or revoked access to my app?
Why is a boolean missing from an e-conomic response?
How do I filter for several values or for a missing value in e-conomic?
How are special characters encoded in the URLs of the REST API?
Can I generate a client from e-conomic’s OpenAPI specifications?

State of Accounting API Connectivity 2027: Data on 31 Systems
How 31 accounting and ERP systems handle API access: OAuth, credential lifetimes, revocation, webhooks and ledger data. Collected in October and November 2026.
Lennart Svensson · 24 Nov 2026
Lexware Office Partnership Guide: Public API or Partner Route
The Lexware Office Public API runs on an API key from the XL plan. Reaching every plan takes a technology partnership. How Lexware's qualification works.
Dr. Themo Voswinckel · 24 Nov 2026
Chart of Accounts Mapping: Cover Every ERP Customisation
Map each object in your platform to the right account, tax code, dimension and company code in your customer's ERP. Standard and custom configuration in one step.
Dr. Themo Voswinckel · 2 Nov 2026Build once on the Unified API.
Two tokens in every request, a version in every OpenAPI URL and a token bucket per agreement: that is the contract of one system, and the next system you connect has a different one. Through maesn you build against one interface for all of them.