InvoiceHero invoicing software with KVKBase API integration
Case Study -- SaaS

InvoiceHero

Invoicing Software

Industry SaaS / Invoicing
Location Rotterdam, Netherlands
Tech Stack Node.js, KVKBase API, PostgreSQL
Integration KVKBase API
4 → 1 API calls reduced
99.8% Uptime
<50ms Response time

Four API calls, four points of failure

InvoiceHero is a modern invoicing application that helps thousands of SME businesses create and send invoices. A core feature is automatically completing client details based on a KVK number. Sounds simple, but behind the scenes it was a technical maze.

To retrieve complete company details, InvoiceHero needed four separate API calls. First, a call to the KVK Search API to find the base profile. Then a call to the KVK Base Profile API for the full company information. Next, a call to VIES for VAT number validation. And finally, custom logic to calculate the Dutch VAT number based on the KVK number.

This resulted in a fragile system. When VIES went offline -- which happened regularly -- the entire lookup flow failed. The code to combine four different API responses was complex and difficult to maintain. Error handling for four different endpoints led to spaghetti code that nobody wanted to touch. And each API had its own rate limits, authentication, and response formats.

The development team spent an average of 20 hours per quarter maintaining and debugging this integration. Time they would have preferred to spend on new features.

From four API calls to a single KVKBase lookup

InvoiceHero replaced their entire lookup stack with a single KVKBase API call. Instead of four endpoints with four response formats, there is now one call that returns all company information: KVK details, business address, legal form, SBI codes, and VAT number validation -- all in a single JSON response.

The migration was quick. The existing code for four API calls was replaced by a single function. Error handling was drastically simplified because there is only one endpoint to deal with.

Node.js / KVKBase API
// Before: 4 API calls, ~200 lines of code
// Now: 1 KVKBase lookup, 15 lines of code

const response = await fetch(
  `https://api.kvkbase.nl/v1/lookup/${kvkNummer}`,
  {
    headers: {
      "Authorization": `Bearer ${API_KEY}`,
      "Content-Type": "application/json"
    }
  }
);

const company = await response.json();

// Everything in 1 response:
// company.naam, company.adres, company.rechtsvorm,
// company.btw_nummer, company.btw_geldig,
// company.sbi_codes, company.vestigingsnummer

A particularly valuable feature was the built-in VIES caching. KVKBase caches VAT validation results, so lookups continue to work when VIES is temporarily unavailable. This was precisely the problem that caused InvoiceHero the most headaches. Now a cached validation is returned with a clear timestamp, so users know how recent the validation is.

Response time dropped below 50 milliseconds, a significant improvement over the 800+ milliseconds that the four sequential API calls took. This made it possible to perform real-time lookups while the user types, instead of after submitting a form.

Less code, more reliability

The impact of the migration to KVKBase was immediately measurable. The development team was able to replace the old integration code of more than 200 lines with a compact module of 15 lines. This alone drastically reduced maintenance costs.

The uptime of the lookup function rose from an erratic 97% (due to VIES downtime) to a stable 99.8%. Users no longer complain about failed lookups. The built-in VIES caching handles the remaining 0.2% by returning cached results when VIES is unavailable.

The development team now saves 20 hours per quarter that were previously spent on maintenance and debugging of the lookup integration. That time now goes toward new features that customers actually ask for.

4 → 1 API calls reduced

Four separate API calls to KVK Search, Base Profile, VIES, and custom VAT logic have been replaced by a single KVKBase lookup that returns all data.

99.8% Uptime

The lookup functionality is virtually always available. VIES caching ensures that VAT validation continues to work, even when VIES itself is offline.

<50ms Response time

Response time dropped from 800+ milliseconds to under 50 milliseconds. This enables real-time lookups while the user types.

20 hrs Saved per quarter

The development team spends 20 fewer hours per quarter on maintenance and debugging of the company lookup integration. That time now goes toward product improvement.

"We needed 4 separate API calls. Now it's just 1. The VIES caching alone saves us countless headaches."

Lisa van den Berg Lead Developer, InvoiceHero

Ready to simplify your API integration?

Replace complex multi-API flows with a single KVKBase call. Start free with 50 lookups per month.