Guide4 min read

Twinfield API: signing in, browse codes and retrieving data

How the Twinfield API works: signing in with OAuth 2.0, the cluster address, the XML web services and browse codes such as 030_3 for transactions.

Auke Westra

By Auke Westra

Founder of DigiData

Practical guide. This article covers the steps, checks, and common issues. View the Twinfield product page for supported data, operation and availability.

Short answer

The Twinfield API consists mainly of SOAP web services with XML messages. You sign in through OAuth 2.0 at Wolters Kluwer, use your access token to request the user's cluster address and then call web services such as ProcessXml to read or write data. You retrieve transactions with browse codes, such as 030_3 for transaction lines, always per company (office).

What can you do with the Twinfield API?

With the Twinfield API you read general ledger accounts, customers and suppliers, cost centres, projects, transactions and open items, and you can create invoices and transactions. Developers use it to connect invoicing, web shops and point-of-sale systems, and to pull accounting data into a data warehouse or reporting tool.

DigiData uses this API every day to sync Twinfield companies. This article describes how that works in practice. The official source is the Twinfield web services documentation.

SOAP and XML, not a modern REST API

If you are used to JSON and REST, Twinfield takes some adjusting. Most of the API consists of SOAP web services that receive and return XML messages. The most important ones:

Web serviceWhat for
ProcessXmlReading and writing data with XML commands, such as <read> for a customer or general ledger account, and browse commands for transactions
FinderSearching for codes, such as all customers or all offices
HierarchiesReporting structures of the general ledger

Step 1: sign in with OAuth 2.0

Twinfield uses OAuth 2.0 through the Wolters Kluwer sign-in service. You register an app with Twinfield, send the user to the sign-in screen and exchange the code at https://login.twinfield.com/auth/authentication/connect/token for an access token and refresh token.

Then comes a step many developers miss: Twinfield runs on several clusters. With the access token you call the validation endpoint, and the response contains the user's cluster address. You then call all web services on that address, for example {cluster}/webservices/processxml.asmx. The cluster address can change when the token is refreshed, so request it again.

Step 2: choose the company

In Twinfield a company administration is called an office. A user often has access to several offices, and an accounting firm to hundreds. You pass the office code with every command. You get a list of offices through the Finder.

Step 3: retrieve transactions with browse codes

You do not retrieve transactions and open items per record, but with a browse: a predefined overview with a code, columns and filters. For transaction lines that is browse code 030_3. You state which columns you want and filter, for example, by period:

<columns code="030_3">
  <column><field>fin.trs.head.yearperiod</field><operator>between</operator><from>2026/01</from><to>2026/12</to></column>
  <column><field>fin.trs.head.code</field><visible>true</visible></column>
  <column><field>fin.trs.head.number</field><visible>true</visible></column>
  <column><field>fin.trs.line.dim1</field><visible>true</visible></column>
  <column><field>fin.trs.line.valuesigned</field><visible>true</visible></column>
</columns>

You send this message through ProcessXml. The response is an XML table with the requested columns. For incremental updates you filter on the transaction's modification date (fin.trs.head.modified), so you do not retrieve the whole year every time.

Master data, such as general ledger accounts (dimension types BAS and PNL), customers and suppliers (DEB and CRD) and cost centres (KPL), you read with a <read> command per code, or look up first with the Finder.

What to watch out for

  • Large responses. A browse over a whole year in a large company can return many lines. Split by period.
  • Per office. Everything goes per company. With many offices the number of calls adds up quickly.
  • Data types in XML. Amounts and dates come back as text; watch the decimal separator and date format when converting.
  • User permissions. The API only sees what the signed-in user may see in Twinfield.

When you do not need to build on the API yourself

For a one-off export the API is fine to use. A connection that reliably keeps up all transactions, customers, suppliers and ledger structures every day takes more work than it seems. If you only want to use the data for reports or AI, there are shorter routes:

Also working with Exact Online? Read how the Exact Online API works.

Sources

Auke Westra

About Auke Westra

Founder of DigiData

Auke Westra is Founder of DigiData. He was responsible for clients' data and reporting and in 2025 began building an in-house data platform with his team. He writes about AI on business data, data definitions, Power BI and integrations.

Ready to start?

Try DigiData free for 14 days. Connect your software and use your data in dashboards, the AI agent or Power BI.

Related articles