Guide · Onboarding

Autofill a company form from a VAT number

A business customer signing up should type one thing: their VAT number. The legal name, the legal form and the registered address are already written down in an official register. Asking them to type it all again is asking them to introduce mistakes.

The company block

Every B2B sign-up, checkout and supplier form ends up asking for the same six fields: company name, legal form, street, postal code, city, VAT number. They are filled in by someone who wants to be finished with them, often on a phone, often copying from a document that is not in front of them.

That block is where B2B forms lose people, and where the quality of the invoice, the CRM record and the accounting export is decided.

What it changes

One field instead of six takes the step from about a minute to a few seconds. On a sign-up that already asks a lot, cutting five fields out of its longest screen is the cheapest reduction in abandonment available.

The second effect is slower to show up and matters more. When the name and the address come from the register rather than a keyboard, the invoice goes to the exact legal entity, and the CRM stops holding the same company four times because somebody wrote SARL three different ways. Typos in a company block do not stay in the company block; they travel to the accounting export and are found there, months later, by someone who has to reconcile them.

The lookup also tells you something about the number itself. One that resolves to a company exists; one that resolves to nothing is worth flagging before the first zero-rated invoice rather than after.

Where the difficulty is

Nobody builds this in an afternoon, because there is no single method. There is one per country. Three examples give the shape of it.

  • France. The VAT number contains the SIREN, so the identifier is free. The company data behind it is published as open files of several gigabytes, updated monthly, with the names in one file and the addresses in another. Getting one company means having already ingested all of them.
  • Poland, Romania, Czechia. The tax administration exposes its own API. Each has its own URL, request shape, field names, quota and way of saying "not found". Three countries, three integrations.
  • Germany. No register will hand you the company behind a VAT number. Whatever coverage exists comes from elsewhere, and it is thinner than a register entry.

Multiply that by the countries you sell to, then add the problems that are the same everywhere:

  • The VAT number is rarely the company number. Sometimes it is the same identifier, sometimes it is derived from it, sometimes the two have nothing to do with each other. There is no single join rule to write.
  • The name is not always disclosed. A handful of member states publish validity and nothing else, so the form has to work when the name comes back empty.
  • The address arrives as free text, in a different convention per country: the postal code before the town or after it, the province appended, the street split over two lines. Turning that into line1 / postalCode / city is a job of its own.
  • The input is dirty. Spaces, dots, dashes, the country prefix typed or omitted, lowercase.
  • A valid checksum proves nothing. The check digit of a struck-off company is still correct. Offline validation says the number is well formed, and stops there.
  • Official sources go down. Not often, not never, and not predictably. A form that waits for an answer before letting anyone submit breaks during somebody else's maintenance window.

One call, every country

This is what a single API is for: one endpoint, one envelope, the same field names, whichever country the number belongs to. Vatlas covers 32 codes, being the 27 member states, Northern Ireland, and Australia, Japan, Singapore and Brazil.

curl "https://api.vatlas.dev/v1/lookup/FR68005420120" \
  -H "Authorization: Bearer $VATLAS_KEY"

Response:

200 OK

{
  "data": {
    "vatNumber": "FR68005420120",
    "countryCode": "FR",
    "nationalNumber": "68005420120",
    "nationalId": "005420120",
    "name": "SOCIETE DES SUCRERIES DU MARQUENTERRE",
    "legalForm": "Autre SA à conseil d'administration",
    "status": "active",
    "address": {
      "line1": "32 CHEMIN DES GARENNES",
      "line2": null,
      "postalCode": "80120",
      "city": "SAINT-QUENTIN-EN-TOURMONT",
      "country": "FR"
    }
  },
  "meta": {
    "source": "SIRENE",
    "sourceDate": "2026-09-01",
    "sourceSince": "2026-06-01",
    "sourceUpdatedAt": "2026-02-13T11:07:03.000Z"
  }
}

Everything the form needs is already separated: name and legalForm for the identity, address broken into line1, line2, postalCode, city and country, nationalId for the national company identifier, and status. The meta block names the register that answered and the date it said so, which is what you keep if the record ever has to be justified.

Designing the form

Normalise on the way in: uppercase, strip spaces and punctuation, accept the number with or without its country prefix. Do it once, so the rest of the code only ever sees one shape. Then call from your own server. The API key identifies your account and belongs behind a route of your own, not in a front-end bundle; that route is also where you debounce a field firing on every blur.

Fill the fields and leave them editable. Registers lag reality, a company that moved last month is still at its old address in the file, and the person at the keyboard knows better than the file does. Locking a prefilled field turns a convenience into a support ticket.

Let the form submit whether or not an answer arrived. Give the lookup a short timeout and treat it as an assist. An empty name is not an error; in a few countries it is the correct and complete answer. Three outcomes are worth telling apart on screen: filled from the register, no company found for this number, and no answer right now. The second deserves a soft warning beside the field. The third is your problem, not the customer's, and should look like it.

Store what the register said, and when, alongside the order or the account. If the exemption is questioned later, the answer is a dated record.

Autofill is not verification. Filling a form is a convenience and can be done from a stored answer. Deciding whether to charge VAT is a legal act, and deserves a check made at that moment with the proof kept. Do both, and keep them separate.

After the form

A company record is true on the day it is captured and stops being true afterwards. Names change, addresses change, companies are struck off. Vatlas can follow the companies you have already onboarded and call you back when the register changes its mind, so the correction happens before an invoice goes to the wrong place: see the monitor endpoint. For the history of what each register has said over time, there is the complete report.

What we do not promise. A few member states disclose validity and no name, so autofill cannot fill the name there. German coverage rests on a self-declared source rather than a register, which is why those answers carry a status of unknown. There is no United Kingdom and no Switzerland today.

Frequently asked

Autofill from a VAT number, in short

Can I fill a company's name and address from just a VAT number?

In most countries, yes. An official register holds the legal name, the legal form and the registered address, and the VAT number is enough to reach it. In a few member states the administration publishes only whether the number is valid, so the name comes back empty and the form has to be built for that case.

Why not call each country's register myself?

You can, and for one or two countries it is reasonable. Every country is then a separate integration: its own API or its own multi-gigabyte open data files, its own field names, quotas and outages, and an address in free text to parse into fields. One API returning one envelope for every country is what you are buying.

Does autofill also verify the number?

It tells you a company was found, which is a strong signal, and it is not a documented check made at the moment you decide not to charge VAT. Do the lookup for the form, and keep a dated record of the verification for the invoice.

Should the lookup run in the browser?

No. The API key identifies your account and must stay server-side. Put a small proxy route in your own backend and let the browser call that; it is also where you debounce a field that would otherwise fire on every keystroke.

What should the form do if the lookup fails?

Let the customer through. Fire the call on blur with a short timeout, and if no answer comes, leave the fields empty and editable and allow submission. A sign-up blocked because a third-party register is having a bad morning is worse than a manually typed address.

Should the prefilled fields be read-only?

No. Registers lag reality, and the person in front of the form usually knows more about their own company than a file published last month. Prefill, show where the value came from, and let it be corrected.

How many countries does this work for?

Vatlas answers for 32 codes: the 27 EU member states, Northern Ireland, and Australia, Japan, Singapore and Brazil. What each country discloses differs, and the country pages say so one by one.

Keep reading

Last updated 9 September 2026.

Creating a key takes a minute

100 requests a month for free, no card required. 5,000 a month for 29 € excl. VAT when you outgrow it.