Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

zefix

10 sites No security coverage
View on drupal.org
Zefix

A Drupal module that provides API integration for the Central Business Name Index (ZEFIX) of Switzerland.

Description

The Zefix module enables Drupal sites to integrate with Switzerland's official commercial register database through the ZEFIX REST API. ZEFIX is the centralized online database of the Swiss Commercial Register, containing vital legal and economic information about companies domiciled in Switzerland.

Features

  • Company Search: Search for companies registered in the commercial register by various parameters
  • Company Details: Retrieve detailed company information by UID, CHID, or EHRAID
  • SOGC Integration: Access Swiss Official Gazette of Commerce (SOGC) publications
  • Legal Forms: Query available legal forms for Swiss companies
  • Registry Information: Access registry of commerce data
  • Community Data: Retrieve community-based company information
  • Date-based Queries: Search companies by registration or modification dates
  • Environment Support: Configurable test and production environment endpoints

Requirements

  • Drupal 8.8+ (compatible with Drupal 8, 9, 10, and 11)
  • Valid ZEFIX API credentials (username and password)
  • cURL extension for PHP

Installation

composer require drupal/zefix

Manual Installation

  1. Download the module and place it in your modules/contrib directory
  2. Enable the module: drush en zefix

Configuration

  1. Navigate to Administration > Configuration > System > Zefix API Configuration (/admin/config/system/zefix)
  2. Configure the following settings:
    • Environment: Choose between Test or Production
    • User: Your ZEFIX API username
    • Password: Your ZEFIX API password

API Services

The module provides several services for interacting with the ZEFIX API:

$search_service = \Drupal::service('zefix.search');
$results = $search_service->search($search_parameters);

Company Details by UID

$uid_service = \Drupal::service('zefix.showUID');
$company = $uid_service->showUID('CHE-123456789');

SOGC Publications

$sogc_service = \Drupal::service('zefix.get');
$publication = $sogc_service->get('publication_id');

Other Available Services

  • zefix.showCHID - Get company details by CHID
  • zefix.showEhraid - Get company details by EHRAID
  • zefix.community - Community-related queries
  • zefix.legalForm - Legal form information
  • zefix.registryOfCommerce - Registry of commerce data
  • zefix.byDate - Date-based company queries
  • zefix.byBfsCommunityId - BFS community-based queries

API Endpoints

The module connects to the official ZEFIX REST API:

  • Test Environment: https://www.zefixintg.admin.ch/ZefixPublicREST/api/v1/
  • Production Environment: https://www.zefix.admin.ch/ZefixPublicREST/api/v1/

Usage Examples

$search_service = \Drupal::service('zefix.search');
$search_data = [
  'name' => 'Example Company',
  'activeOnly' => true
];
$results = $search_service->search($search_data);

Get Company by UID

$uid_service = \Drupal::service('zefix.showUID');
$company_details = $uid_service->showUID('CHE-123456789');

Error Handling

All services include error handling and logging. Failed API requests are logged to the Drupal watchdog with the 'zefix' channel. Check your site's logs for debugging API connection issues.

Permissions

The module defines the following permission:

  • Administer zefix configuration: Required to access the configuration form

API Documentation

For detailed information about the ZEFIX API endpoints and parameters, refer to the official API documentation:

Support

Acknowledgements

This module was initially developed by Effective Bytes and funded by GS1 Switzerland.

License

This project is licensed under the GPL-2.0-or-later license.

Contributing

Contributions are welcome! Please follow Drupal coding standards and submit patches through the project's issue queue.

Activity

Total releases
2
First release
Aug 2025
Latest release
3 months ago
Release cadence
155 days
Stability
100% stable

Releases

Version Type Release date
1.0.3 Stable Jan 17, 2026
1.0.2 Stable Aug 15, 2025