---
title: "Check VAT registration for a UID"
method: GET
path: "/companies/vat-number"
tags: ["Companies"]
---

# Check VAT registration for a UID

`GET /companies/vat-number`

## Request

- Base URL: `https://api.vocal.email/v1`
- URL: `https://api.vocal.email/v1/companies/vat-number`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/vocal/apis/magic-heidi-invoicing-software-api/docs/companies/vat-number/get.ts> (a function with typed inputs; its response is checked against the schema)

Checks the official BFS UID register (uid.admin.ch) to see whether the given UID is registered for Swiss VAT. Returns `vatRegistered` plus `vatNumber` (`CHE-XXX.XXX.XXX MWST`) when registered, or `vatNumber: null` when not. Call this with the `uid` from `/companies/autocomplete` after the user selects a company, and only prefill the VAT field when `vatRegistered` is true. Results are cached server-side; the upstream register is queried live otherwise.

## Query parameters

- `uid` string, required

## Response `200`

VAT registration status

## Other responses

- `400`: Malformed UID
- `401`: Invalid API key
- `500`: Internal Server Error
- `503`: VAT register check 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.dev/vocal/apis/magic-heidi-invoicing-software-api/revisions/d0319ad57804?raw)
