# Switzerland

Swiss companies come from the federal commercial register (Zefix), the
federal UID register, the Swiss Official Gazette of Commerce (SOGC) and the
cantonal register excerpts. All five sources are official and free. Four of
them need no account; the Zefix REST API needs free credentials that the
operator enters once (see [Activating Zefix REST](#activating-zefix-rest)).

## Sources

| Source | Gives | Access | Default |
|---|---|---|---|
| `lindas_zefix` (Zefix on LINDAS) | legal name and its de/fr/it/en versions, UID, CH-ID, EHRA-ID, legal form, seat municipality (BFS number), registered address, purpose | SPARQL, no login; active entities only, updated daily | on |
| `uid_register` (UID register, BFS) | master data of every UID, also outside the commercial register (administrations, sole traders, associations, VAT-only entities): names, legal form, UID and register status, legal and postal addresses, register entry and deletion dates, VAT status and number, LEI | SOAP, no login; about 20 requests per minute | on |
| `zefix_rest` (Zefix Public REST API) | the full register record, deleted companies included: status and deletion date, nominal capital, former names, SOGC publications, head and branch offices, mergers, audit firms, link to the cantonal excerpt | HTTP basic credentials from the Federal Office of the Commercial Register | **off** until credentials are set |
| `sogc` (Swiss Official Gazette of Commerce) | the events timeline: incorporation, name, seat, address, purpose and capital changes, officer changes (who joined or left, with dates), mergers, liquidation, deletion; the company as its latest publication states it; daily change feed | Amtsblattportal public API, no login | on |
| `ch_cantonal_excerpt` (cantonal register excerpts) | officers and signatories: name, role, signing authority, since/until, residence, origin or nationality as published | public excerpt pages; robots.txt respected | on |

Where sources disagree, the register (Zefix, UID register, cantonal
excerpts) ranks above the gazette; every value keeps its source, and
conflicts are shown (see [Company data sources](/docs/companies-sources.md)).

## Identifiers

| Scheme | Example | Notes |
|---|---|---|
| `ch_uid` | `CHE-101.049.653` | Enterprise identification number; the check digit is verified. `CHE101049653`, `CHE-101.049.653 MWST` and `che 101 049 653` are accepted. |
| `ch_chid` | `CH02030216152` | The former 11-digit commercial-register number (CH-ID); `CH-020.3.021.615-2` is accepted. |
| `ch_ehraid` | `460530` | Internal id of the federal register office, one per register entry. |
| `vat` | `CHE101049653` | Swiss VAT numbers are UIDs. A company in a VAT group is taxed under the group's number; that number is not added to the members, so they stay separate records. |

A company with two head offices (Nestlé AG in Cham and Nestlé S.A. in Vevey)
has one UID and two register entries: the record carries both EHRA-IDs and
CH-IDs, the entry with the lower EHRA-ID gives the name, and the second seat
appears as an address of type `other`.

## Fields

- **Legal form**: the eCH-0097 code as `local_code` (`0106`), the name in the
  canton's language as `local_name` (Aktiengesellschaft, société anonyme,
  società anonima), the ISO 20275 ELF code and the category. Examples: AG / SA
  `MVII`, GmbH / Sàrl / Sagl `3EKS`, Genossenschaft `QSI2`, Verein `H781`,
  Stiftung `2JZ4`, Einzelunternehmen `AZA0`, Kollektivgesellschaft `MRSY`,
  Kommanditgesellschaft `CQMY`, Swiss branch `UNA9`, branch of a foreign
  company `JB25`, federal administration `2XJA`.
- **Status**: `active`; `in_liquidation` (status `BEING_CANCELLED`, or "in
  Liquidation / en liquidation / in liquidazione" in the name); `dissolved`
  after deletion; `merged` when the company was taken over. `local_value` keeps
  the source's wording and `since` the deletion date.
- **Addresses**: the registered address with the BFS municipality number,
  and the postal address (PO box) from the UID register.
- **Purpose**: in the register's language (`de`, `fr` or `it`).
- **Capital**: nominal capital, and paid-in capital from the SOGC.
- **Relationships**: `auditor`, `merged_into`, `absorbed`, `branch`,
  `head_office` (Zefix REST).
- **Activities**: NOGA codes, with their NACE class, when the UID register
  publishes them.
- **People** (`include=people`): every officer and signatory the cantonal
  excerpt lists, current and former, with role (`chair`, `director`, `ceo`,
  `managing_director`, `partner`, `auditor`, `liquidator`, `secretary`,
  `signatory`, `member`) and the register's own wording, signing authority
  (`individual`, `joint_two`, `joint`, `procuration_individual`,
  `procuration_joint_two`, `none`), since/until from the register journal,
  residence and origin or nationality. Officer changes published in the SOGC
  are also in `events` with the people who joined or left. The register
  publishes no birth dates and Cormorant stores none.
- **Events** (`include=events`): one entry per change and publication, with
  the publication link on shab.ch, the publication and journal numbers and
  dates, and details such as the old and new name or capital, the other
  company of a merger, or the people of an officer change.

```sh
curl -s "https://api.cormorant.ch/v1/companies/ch_uid:CHE-105.909.036?include=people,events" \
  -H "Authorization: Bearer $CORMORANT_API_KEY"
```

## Freshness

| Field group | Refreshed after | Kept current by |
|---|---|---|
| core (name, legal form, status, address, purpose, capital) | 24 hours | the SOGC daily feed |
| people | 7 days | officer changes in the SOGC feed |
| events | 24 hours | the SOGC daily feed |
| relationships | 24 hours | Zefix REST |

The gazette publishes every register change on the day it takes effect for
third parties. Cormorant reads its daily feed and applies the publications
to companies already in the register, without your request. LINDAS and the
UID register update daily. A company that is not in LINDAS has been deleted
or is not in the commercial register: the UID register and Zefix REST still
know it.

## Activating Zefix REST

Zefix REST adds deleted companies, capital, former names, mergers, branches
and audit firms. It stays inactive until credentials are set:

1. The operator requests credentials from the Federal Office of the
   Commercial Register (zefix@bj.admin.ch). They are free of charge.
2. In Mission Control, open **Company data → Sources → zefix_rest** and
   enter the **username** and **password**. Credentials are encrypted at
   rest, never shown again and never logged.
3. Switch the source **on**. The source card shows its health and canaries
   (Nestlé, UBS Group). A wrong password shows as error class `auth`.

`GET /v1/companies/sources` then lists `zefix_rest` as active.

## Limits

- Cantonal excerpts are fetched only where the canton's robots.txt allows
  it. Where it does not, the source answers `blocked` and officers come from
  the SOGC events only.
- Some French-speaking register offices write officer changes as prose, not
  as labelled lists. Cormorant reads the usual sentences ("n'est plus
  administrateur", "Nouvel organe de révision: …", "Signature individuelle
  est conférée à …"). Unusual wording yields an officer-change event without
  the people.
- The UID register allows about 20 requests per minute. Bulk lookups take
  their time, and the register answers in the meantime.
