Guide · Onboarding

Autofill a company form from a VAT number

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

One field typed, the rest filled from the register.

The company block

Every B2B sign-up, checkout and supplier form asks 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.

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 long sign-up, that is the cheapest reduction in abandonment available.

The slower effect matters more. When the name and address come from the register rather than a keyboard, the invoice reaches the right legal entity and the CRM stops holding the same company four times because somebody wrote SARL three different ways.

The lookup also says something about the number itself. One that resolves to nothing is worth flagging before the first zero-rated invoice rather than after.

Where the difficulty is

There is no single method, only one per country. Some publish their whole company repertory as open files of several gigabytes, names in one and addresses in another. Some expose an API of their own, with its own request shape and its own way of saying "not found". And in a few, no register will hand you the company behind a VAT number at all. Getting a company's name and address works through that country by country.

Multiply it by the countries you sell to, then add what is the same everywhere:

  • The VAT number is rarely the company number. Sometimes the same identifier, sometimes derived from it, sometimes unrelated. 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. 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, not predictably. A form that waits for an answer before letting anyone submit breaks during somebody else's maintenance window.

One call, every country

One endpoint, one envelope, the same field names, whichever country the number belongs to. Vatlas answers the same way for every country it covers, and the country pages are the current list.

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: one response field per form field, nothing to parse. The meta block names the register that answered and the date, 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. Once, so the rest of the code sees one shape.
  • 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, and the person at the keyboard knows their own company better than a file published last month.
  • Let the form submit either way. Short timeout, treat the lookup as an assist. An empty name is not an error; in a few countries it is the complete answer.
  • Separate three outcomes on screen. Filled from the register, no company found, and no answer right now. The second is a soft warning beside the field. The third is your problem, not the customer's.
  • Store what the register said, and when. 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. Vatlas can follow the companies you have onboarded and call back when a register changes its mind, so the correction lands before an invoice goes to the wrong place: see the monitor endpoint. For what each register has said over time, there is every source's answer.

What we do not promise. Some administrations disclose validity and no name, so autofill cannot fill the name there. That is an outcome your form has to handle, not an outage. Where an answer does not rest on an official register, status and meta say so, rather than letting a field fill itself as though nothing were different. And coverage is not the whole world: the country pages say what it is today, one country at a time.

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 multi-gigabyte files, its own field names, quotas and outages, and a free-text address to parse. 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?

One endpoint and one envelope, for every country Vatlas covers. What each country discloses differs, and the country pages are the current list, one by one.

Keep reading

Last updated 21 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.