vatverify home
All guides

Swiss BFS and Zefix explained: UID, VAT, and the eCH-0097 schema

How the Swiss Federal Statistical Office runs the UID register, how Zefix relates to it, what the SOAP endpoint returns, and why Liechtenstein rides the same rails.

Key facts

  • Switzerland issues a single business identifier (the UID, in the format CHE + 9 digits) used across every federal agency. VAT registration is a separate flag on that UID.
  • The UID register is run by the Federal Statistical Office (Bundesamt für Statistik, BFS) and exposed as a SOAP web service at uid-wse.admin.ch using the eCH-0097 standard.
  • Zefix is the Swiss commercial register (run by the Federal Office of Justice) and covers legal-entity registration; it is a separate dataset from the UID register but shares the same CHE identifier.
  • Liechtenstein validates through the same BFS endpoint: LI-prefixed numbers carry a CHE-format UID underneath.
  • Swiss VAT carries language-dependent suffixes (MWST / TVA / IVA) that are display-only and never sent upstream.

What the registry is

Before the UID was introduced, Swiss businesses carried several different identifiers: a commercial-register number, a tax-authority number, an insurance-authority number, and so on. The Federal Act on the Business Identification Number (Unternehmens-Identifikationsnummer-Gesetz, UIDG) of 2011 consolidated all of them into a single UID, in the format CHE-xxx.xxx.xxx, issued once at incorporation and used across every federal agency.

Two registers sit alongside that identifier:

  • The UID register, run by BFS. This is the authoritative record of what the UID refers to and whether the business is active, struck off, or in liquidation. The VAT flag lives here.
  • Zefix (the Zentraler Firmenindex), run by the Federal Office of Justice (Bundesamt für Justiz, BJ). This is the commercial-register front-end; it aggregates the cantonal commercial registers and exposes company-level metadata (legal form, registered office, purpose, signatories). It shares the UID but covers a different slice of truth.

For VAT validation specifically, BFS is the right endpoint. The registrationStatus flag on the UID record tells you whether the business is active in the VAT register (MWST-Register). Zefix is useful for richer company metadata once you already know the UID is valid.

Liechtenstein sits inside the Swiss-Liechtenstein customs and currency union and uses the same UID scheme. A Liechtenstein VAT number displayed as LI routes to the same BFS endpoint; the underlying record is a CHE-format UID.

What the API returns

The BFS endpoint speaks SOAP and conforms to eCH-0097, the Swiss e-government standard for UID records, published and versioned by eCH (E-Government Standards Switzerland). The service URL is:

https://www.uid-wse.admin.ch/V5.0/PublicServices.svc

A UID lookup by identifier carries the CHE prefix and the nine-digit core in a typed element. A successful response returns an organisation block with the registered name, address components, legal form code, UID status, and a vatRegisterInformation child if the business is VAT-registered. A simplified view of the relevant fields:

<organisation>
  <uid>
    <uidOrganisationIdCategorie>CHE</uidOrganisationIdCategorie>
    <uidOrganisationId>115932342</uidOrganisationId>
  </uid>
  <organisationIdentification>
    <organisationName>Example AG</organisationName>
    <legalForm>0106</legalForm>
    <address>
      <addressLine1>Musterstrasse 1</addressLine1>
      <town>Zürich</town>
      <swissZipCode>8001</swissZipCode>
    </address>
  </organisationIdentification>
  <status>2</status>
  <vatRegisterInformation>
    <vatStatus>1</vatStatus>
    <vatEntryDate>2018-04-01</vatEntryDate>
  </vatRegisterInformation>
</organisation>

status codes are documented in eCH-0097: 2 = active, 3 = cancelled, 4 = struck off. vatStatus mirrors the same pattern for the VAT sub-register. A business with status: 2 and no vatRegisterInformation element is a valid Swiss company that is not VAT-registered (typically below the CHF 100,000 annual-turnover threshold).

The nine-digit body uses a MOD-11 check digit at the last position, which is the cheapest way to reject typos offline before touching BFS.

Rate limits and quirks

BFS does not publish a hard rate limit. Sustained bursts of roughly fifty requests per second from a single caller do not trip throttling; heavier concurrency can produce intermittent SOAP faults that look like transient timeouts.

Observed quirks:

  • Display variants are plentiful. CHE-123.456.789, CHE123456789, CHE 123 456 789, and CHE-123.456.789 MWST all refer to the same UID. Dots, hyphens, spaces, and the MWST/TVA/IVA suffix are display sugar only; strip them before the upstream call.
  • Three language suffixes, one meaning. MWST (Mehrwertsteuer, German), TVA (Taxe sur la valeur ajoutée, French), and IVA (Imposta sul valore aggiunto, Italian) all signal the same VAT registration. Which one appears usually depends on the canton.
  • Liechtenstein prefix. A LI prefix sent in an international context unwraps to a CHE-format UID. vatverify routes LI to BFS and preserves country.code: "LI" in the response.
  • status: 2, vatStatus: null. The business exists, the UID is live, but it is not VAT-registered. This is a valid business state, not an error. Treat as valid: false for VAT purposes.
  • eCH-0097 version. BFS currently runs V5.0 of the schema. Older client libraries pinned to V4.0 will still work but miss a few fields (notably vatEntryDate). Target V5.0.

How vatverify handles it

The pipeline for CH and LI mirrors the VIES/HMRC shape with one routing twist: both prefixes land on the same BFS endpoint.

  1. Normalise: strip hyphens, dots, spaces, and the MWST/TVA/IVA suffix; uppercase the prefix. The CHE prefix on the input is stripped from the body before the registry call, and CH/LI-prefixed inputs route to the same endpoint.
  2. Format check: the normalised body must be a 9-digit number; inputs that fail the shape check return invalid_format without hitting BFS.
  3. Cache lookup: freshness is 30 days on valid records and 24 hours on invalids, with a seven-day fallback window past freshness used to serve degraded responses when BFS is unreachable.
  4. Upstream call: SOAP POST to BFS with a 10-second timeout; parse the eCH-0097 response into the common data.company shape.

The UID body MOD-11 check digit and other Swiss format rules ship in @vatverify/vat-rates for clients that want to reject typos before calling the API.

A BFS SOAP fault or timeout falls through to the same degraded-cache path as the other registries: return the last good record with meta.source_status: "degraded", or registry_unavailable when nothing is cached.

We do not hit Zefix directly for the /v1/validate endpoint because the VAT flag lives in BFS's UID register. Zefix is useful if a downstream caller wants company-officer data or purpose-of-business text, both of which BFS does not carry; that is a future endpoint, not the current validation surface.

Swiss numbers do not participate in VIES, so there is no authenticated-consultation identifier analogous to the EU requestIdentifier. For audit-grade evidence on a Swiss lookup, snapshot the response body together with the verified_at timestamp returned by the API and store it in tamper-evident form alongside the invoice. The Swiss Federal Tax Administration (Eidgenössische Steuerverwaltung, ESTV) does not publish a machine-readable equivalent of VIES's consultation number, so a timestamped record is the established substitute.

Gotchas worth knowing

  • UID is not VAT. Every registered Swiss business has a UID. Only those over the CHF 100,000 annual-turnover threshold (or those that have voluntarily registered) have the VAT flag set. A valid UID with no VAT flag returns valid: false on /v1/validate.
  • The registration threshold is global turnover, not Swiss-only. A foreign business selling taxable supplies into Switzerland can be required to register even below the domestic threshold. The registry reflects that; your business logic should not assume "no Swiss presence = no Swiss VAT".
  • Sole proprietors get UIDs too. Einzelunternehmen (sole proprietorships) receive the same CHE identifier as companies. Many are below the VAT threshold and therefore valid businesses with no VAT registration.
  • Zefix and BFS disagree on cancellation timing. A business struck off the commercial register (Zefix) can still show status: 2 in BFS for a short window while the VAT deregistration is processed. If a customer disputes a valid: true for a dissolved company, check both registers before concluding the data is wrong.

See the API reference

Validate VAT in three lines.

Free up to 500 requests per month. No credit card.

Start free