
How to Build Spiris Integration With API.1
If you are building a SaaS platform, a fintech app, or a banking solution, offering a seamless integration with Spiris is crucial for user adoption. However, building direct integrations can be time-consuming and maintenance-heavy.
In this guide, we will explore how to implement a robust Spiris integration using Zwapgrid API.1. This approach allows you to standardize your development process—meaning you build the logic once, and it works for Spiris as well as any other supported accounting system.
Here is the complete workflow: from account creation and API key generation to retrieving standardized accounting data.
1. Register Your Account
To get started, head over to https://clients.zwapgrid.com/ and sign up. simply complete the form on the "Get Started" page.
Once registered, you are ready to configure your credentials.
A Note on Environments: New accounts default to a Trial Mode. In this environment, you will interact with a test accounting system that mimics live production data structures. This is perfect for development because it allows you to build your integration logic without needing live customer credentials immediately. When you are ready for real-world data, you can upgrade your plan to production.
2. Generate Your Credentials
You need an API key to authenticate your requests.
- Log in to your dashboard and select API Keys from the menu.
- Click the Create API Key button.
- Enter a name for the key (e.g., "Postman Prod"), add an optional description, and set an expiration date.
- Important: Copy and save the generated token immediately. For security reasons, it will not be displayed again.

3. Establish a Consent
In the API.1 ecosystem, a "Consent" is the bridge between your application and your customer’s data. It represents the permission granted by the user to access their Spiris account.
To initialize this connection, send the following POST request:
curl -X POST "https://apione.zwapgrid.com/api/v1/consents" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "correlation-id: YOUR_CORRELATION_ID" \
-d '{"name": "Spiris Connection"}'- Replace
YOUR_API_KEYwith the token you generated in step 2. - Check the response headers. You will find a
Locationheader containing a URL similar to:https://apione.zwapgrid.com/consents/api/v1/consents/df94ad33-12e7-4e72-96ce-8c645e00f15f - The UUID at the end (
df94ad33...) is your Consent ID. Save this for the next step.
4. Create the Onboarding Link (OTC)
To finalize the connection, your customer needs to log in to Spiris and authorize access. This is handled via a One-Time Code (OTC).
- OTCs are single-use.
- If the user interrupts the flow, you must generate a new code.
Generate the code with this request:
curl -X POST "https://apione.zwapgrid.com/api/v1/consents/<consentId>/otc" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "correlation-id: YOUR_CORRELATION_ID"Constructing the User Link: Now, combine your Consent ID and the OTC to create the URL you will present to your user:
https://onboarding.zwapgrid.com/consent/<consentId>otc=<otc>/spiris
Pro Tip: By appending /spiris to the end of the URL, you bypass the system selection screen and take the user directly to the Spiris login page. If you remove this suffix, the user will be presented with a list of all supported accounting systems to choose from.
The User Experience:
- The user clicks your "Connect" button.
- They are redirected to the Spiris login.
- Once they authenticate, the Consent is activated.
- You can set a redirect URL to redirect user to a specific page (e.g your web app)
5. Fetch Unified Data
With an active Consent, you can now pull data. The best part? The data schema is unified. Whether the source is Spiris or another platform, say Fortnox or Bjorn Lunden, the JSON structure you receive remains consistent.
For example, to retrieve sales invoices:
curl 'https://apione.zwapgrid.com/accounting/api/v1/consents/<consentId>/salesinvoices' \
-H 'x-correlation-id: <your-correlation-id>' \
-H 'x-api-key: <your-secret-token>'This request returns a standardized list of invoices. To see other data points you can access (like Customers, Supplier Invoices, or Payments), check out the Accounting API Reference.
New customer using a different accounting system? Onboard them to the other system and your app continues to function without adaptation because the data format stays consistent.
Conclusion
Integrating Spiris doesn't require a custom, one-off build. By leveraging Zwapgrid, you solve authentication, consent management, and data mapping in one go.
This "build once, scale everywhere" architecture means that if you decide to support other ERPs or accounting systems in the future, your existing code requires virtually no changes.
Ready to launch?👉 Create your account today to start integrating Spiris, and expand to new systems whenever you're ready.
