---
title: "Auto-complete Swiss companies (Zefix)"
method: GET
path: "/companies/autocomplete"
tags: ["Companies"]
---

# Auto-complete Swiss companies (Zefix)

`GET /companies/autocomplete`

Type-ahead search over the Swiss commercial register (Zefix). Matching is accent-insensitive and token-prefix based, so `bellev rest` matches `Restaurant Bellevue`. Returns up to `limit` companies with their registered address (`street` = street name only, `buildingNumber`, `zip`, `city`). The street/number split is best-effort: when the registered address has no recognizable trailing house number (e.g. PO boxes or c/o lines), the full line is returned in `street` and `buildingNumber` is empty. `uid` is the company's UID (enterprise identification number, `CHE-XXX.XXX.XXX`). Zefix also supplies `legalForm` (for example `AG / SA` or `GmbH / Sàrl`) and the stable eCH-0097 `legalFormCode`. It does not know whether the company is VAT-registered — to prefill a VAT number, pass the `uid` to `GET /companies/vat-number` after the user picks a company. Each `name` is pre-formatted to the invoice constraint (max 70 characters per line, at most 2 lines); `name_lines` gives the same value already split into those lines. Queries shorter than 2 characters return an empty list.

## Query parameters

- `q` string, required
- `limit` integer

## Response `200`

Matching companies

## Other responses

- `400` — Bad Request
- `401` — Invalid API key
- `500` — Internal Server Error
- `503` — Company search temporarily unavailable

---

[API](https://skmtc.dev/vocal/apis/magic-heidi-invoicing-software-api.md) · [All operations](https://skmtc.dev/vocal/apis/magic-heidi-invoicing-software-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vocal/magic-heidi-invoicing-software-api/revisions/591ae048f0a0/schema)
