PHPackages                             kokonut-ch/laravel-swiss-company-registry - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. kokonut-ch/laravel-swiss-company-registry

ActiveLibrary[Search &amp; Filtering](/categories/search)

kokonut-ch/laravel-swiss-company-registry
=========================================

Laravel Package | Search and validate Swiss companies through interchangeable official registries (Zefix, UID register).

v0.2.0(today)26↑2400%MITPHPPHP ^8.3CI passing

Since Jul 23Pushed todayCompare

[ Source](https://github.com/kokonut-ch/SwissCompanyRegistry)[ Packagist](https://packagist.org/packages/kokonut-ch/laravel-swiss-company-registry)[ Docs](https://github.com/Kokonut-ch/SwissCompanyRegistry)[ GitHub Sponsors](https://github.com/kokonut-ch)[ RSS](/packages/kokonut-ch-laravel-swiss-company-registry/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (10)Versions (3)Used By (0)

   ![Kokonut](art/logo.svg)    ![Open source, MIT licensed](art/open-source.svg)

---

Swiss Company Registry
======================

[](#swiss-company-registry)

 [![Packagist](https://camo.githubusercontent.com/6664735f99566192b08ed393d0bcd499ba72f0aa3c3fdad7fcb7d891b4ca81e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f6b6f6e75742d63682f6c61726176656c2d73776973732d636f6d70616e792d72656769737472792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kokonut-ch/laravel-swiss-company-registry) [![PHP from Packagist](https://camo.githubusercontent.com/0c9576abac639ae80fb04613523a731e5734ac72612b3949c578a7ea67332391/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6b6f6b6f6e75742d63682f6c61726176656c2d73776973732d636f6d70616e792d72656769737472792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kokonut-ch/laravel-swiss-company-registry) [![Tests](https://camo.githubusercontent.com/9c093b1be4f96f9dafef4d9bf8fe8432e77b6926b3ef188465107af710c5e23d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4b6f6b6f6e75742d63682f5377697373436f6d70616e7952656769737472792f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473267374796c653d666c61742d737175617265)](https://github.com/Kokonut-ch/SwissCompanyRegistry/actions) [![Total Downloads](https://camo.githubusercontent.com/8b7be7953607ebe36dba31d2e2c2a3e286927711ebf16b94f8592bbd6d26036c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f6b6f6e75742d63682f6c61726176656c2d73776973732d636f6d70616e792d72656769737472792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kokonut-ch/laravel-swiss-company-registry)

Search and validate Swiss companies through the two official registries, behind one facade and interchangeable providers:

- **[Zefix](https://www.zefix.admin.ch)** (Central Business Name Index, REST): every entity recorded in the cantonal commercial registers, with purpose, capital and excerpt links.
- **[UID register](https://www.uid.admin.ch)** (Federal Statistical Office, SOAP): every holder of a Swiss enterprise identification number, including entities outside the commercial register, plus the authoritative `ValidateUID` and `ValidateVatNumber` operations.

---

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 12 or 13

---

Installation
------------

[](#installation)

```
composer require kokonut-ch/laravel-swiss-company-registry
```

The UID register needs no credentials. Zefix requires free API credentials from the Federal Office of Justice:

```
ZEFIX_USERNAME=your-username
ZEFIX_PASSWORD=your-password
```

No credentials yet? Set `SWISS_COMPANY_REGISTRY_PROVIDER=uid-register` and every call is served by the UID register. Publishing the config file, caching, locales and the test environment are covered in [docs/configuration.md](docs/configuration.md).

---

Usage
-----

[](#usage)

```
use Kokonut\SwissCompanyRegistry\Facades\SwissCompany;

SwissCompany::search('Boulangerie Muster');      // company search across the registries
// or SwissCompany::suggest('muster');           // autocomplete alternative: matches anywhere

SwissCompany::find('CHE-123.456.788');           // full record: legal form, address, canton
SwissCompany::validateVatId('CHE-123.456.788');  // Active | Inactive | Unknown

// ----------------

use Kokonut\SwissCompanyRegistry\Facades\SwissUid;

SwissUid::parse('che 123 456 788')->formatVat();  // "CHE-123.456.788 TVA", offline
```

---

Providers at a glance
---------------------

[](#providers-at-a-glance)

CapabilityZefixUID registerSearch by name, canton, legal form✅✅Search by town / zip code❌✅Search by commune (BFS id)✅✅Search by registry office✅❌Entities outside the commercial register❌✅Full record (purpose, capital, excerpt links)✅❌VAT registration details❌✅`ValidateUID` / `ValidateVatNumber`❌✅Every call is routed to the first provider that offers the capability and supports the query filters; provider failures surface as exceptions, never as a silent switch. Choosing the default provider, forcing one per call and the production/test switch are covered in [docs/providers.md](docs/providers.md) and [docs/configuration.md](docs/configuration.md).

---

Documentation
-------------

[](#documentation)

PageCovers[docs/configuration.md](docs/configuration.md)Environment variables, config file, Zefix credentials, display language, test environment[docs/searching.md](docs/searching.md)`search()` vs `suggest()`, the full `SearchQuery` API, provider routing, `SearchResults`[docs/company-data.md](docs/company-data.md)`Company`, `Address` (including its line-by-line API), and the `Canton` / `LegalForm` / `CompanyStatus` enums[docs/validation.md](docs/validation.md)The `SwissUid` facade, the `Uid` value object, tri-state validation results, the three validation rules[docs/providers.md](docs/providers.md)Capability matrix, provider routing, forcing a provider, custom providers, exceptions[docs/testing.md](docs/testing.md)The testing fake, `CompanyFactory`, assertions, and the artisan commands[docs/README.md](docs/README.md) indexes all of the above, plus the feature highlights and the roadmap.

---

Development
-----------

[](#development)

```
composer test   # phpstan + pint + type coverage + pest
composer lint   # auto-fix code style
```

---

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

---

Contributing
------------

[](#contributing)

Please review our [contributing guide](.github/CONTRIBUTING.md) to get started.

---

Security
--------

[](#security)

Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.

---

Credits
-------

[](#credits)

### How this package was built

[](#how-this-package-was-built)

The providers, the value objects, the test suite and this documentation were written with [Claude Code](https://claude.com/claude-code). During development every integration decision was checked against the live registries: the Zefix REST endpoints and the UID register SOAP operations were probed for real, search modes, XML namespaces and fault shapes included, and the test fixtures mirror responses captured from those probes.

Everything was then reviewed by the Kokonut team before release. That review covers the code and the interface mapping, not the registry data itself: what the registries answer is what you get.

### Reference

[](#reference)

The data and the interface contracts come from the two official Swiss registries: the publicly documented [Zefix](https://www.zefix.admin.ch) REST API (Federal Office of Justice) and the [UID register](https://www.uid.admin.ch) SOAP Public Services (Federal Statistical Office), including the eCH-0097 check-digit algorithm. No source code was copied from either administration; see [NOTICE](NOTICE).

This package is an independent client for those two registries. It is not affiliated with, nor endorsed by, the Swiss federal administration, Zefix or the UID register.

### Authors

[](#authors)

- [Kokonut](https://kokonut.ch)
- [All Contributors](../../contributors)

---

License
-------

[](#license)

Swiss Company Registry is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/582222?v=4)[kokonut](/maintainers/kokonut)[@kokonut](https://github.com/kokonut)

---

Top Contributors

[![cbuzas](https://avatars.githubusercontent.com/u/16681165?v=4)](https://github.com/cbuzas "cbuzas (6 commits)")

---

Tags

companieskokonutlaravelpackageregistersearchswissuidzefixlaravelUIDvatswitzerlandzefixcompany-registrycommercial-register

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kokonut-ch-laravel-swiss-company-registry/health.svg)

```
[![Health](https://phpackages.com/badges/kokonut-ch-laravel-swiss-company-registry/health.svg)](https://phpackages.com/packages/kokonut-ch-laravel-swiss-company-registry)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.2k](/packages/craftcms-cms)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
