Latvia VAT API — Validate Latvia VAT Numbers in Real Time
REST JSON endpoint for verifying Pievienotās vērtības nodoklis (PVN) numbers against the official EU VIES register, with national registry fallback where available and a VIES consultation number once you set your own VAT as requester in dashboard Settings.
Why a Latvia-Aware VAT API
In Latvia, VAT is known as Pievienotās vērtības nodoklis (PVN) and the current standard rate is 21%. Every Latvia VAT number starts with the prefix LV and follows a fixed structure issued by the Latvian tax authority. A generic VAT validator that ignores country-specific quirks will accept malformed input, miss the country's format rules, and fail to surface the local registry identifier that accountants and auditors actually need.
The vatnode API normalises PVN input, runs the official VIES check, and returns a single JSON shape with the consultation number, company data where published, and the current Latvia VAT rates inline.
Latvia VAT Number Format
LV + 11 digits^LV\d{11}$Real Latvia VAT numbers you can validate right now:
- LV40003032949 — Latvenergo AS
- LV40003074764 — Swedbank AS
- LV40003245752 — Air Baltic Corporation AS
Validating Latvia VAT Numbers — Code Examples
All three examples validate the same Latvia VAT number LV40003032949. To receive a consultation number back, set your own VAT as requester once in dashboard Settings — then every call, including these, returns a consultation number automatically, with no extra parameters.
curl 'https://api.vatnode.dev/v1/vat/LV40003032949' \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch(
'https://api.vatnode.dev/v1/vat/LV40003032949',
{ headers: { Authorization: `Bearer ${process.env.VATNODE_API_KEY}` } }
)
const data = await res.json()
console.log(data.valid, data.companyName, data.consultationNumber)import os, httpx
r = httpx.get(
"https://api.vatnode.dev/v1/vat/LV40003032949",
headers={"Authorization": f"Bearer {os.environ['VATNODE_API_KEY']}"},
)
data = r.json()
print(data["valid"], data["companyName"], data["consultationNumber"])What You Get Back
A successful response for a valid LatviaVAT number, once you've set your VAT as requester in dashboard Settings, looks like this:
{
"valid": true,
"vatId": "LV40003032949",
"countryCode": "LV",
"countryName": "Latvia",
"companyName": "Latvenergo AS",
"consultationNumber": "WAPIAAAAXk7ZpY3o",
"source": "VIES",
"countryVat": {
"currency": "EUR",
"standardRate": 21,
"reducedRates": [5,12],
"superReducedRate": null,
"parkingRate": null
},
"verifiedAt": "2026-05-19T08:14:22Z"
}When the number is not registered, valid is false and company fields are null. The consultationNumber is the EU VIES requestIdentifier — the documented audit reference for reverse-charge "reasonable care" evidence. It is returned once you set your own VAT as requester in dashboard Settings; otherwise it is null.
Latvia VAT Rates
vatnode returns the current Latvian PVN rates inline with every successful response. Today's rates (standard 21%, reduced 5%, 12%) are sourced from the European Commission TEDB feed, checked daily and updated on any change.
| Rate type | Value |
|---|---|
| Standard | 21% |
| Reduced (1) | 5% |
| Reduced (2) | 12% |
VIES vs National Fallback for Latvia
For Latvia, VIES is the sole authoritative source. vatnode does not run a national-registry fallback for this country today — when VIES is unavailable, the API surfaces a structured VIES_UNAVAILABLE error with retry guidance so you can degrade gracefully rather than silently accept unverified numbers.
Cached VIES responses (15-minute TTL on identical VAT IDs) absorb the majority of short outages transparently. For the full per-country fallback status, see the coverage matrix.
Latvia VAT API — FAQ
Is the Latvia VAT number the same as the company registration number?
No. The Latvian PVN number is issued for VAT purposes and is distinct from any local company registration number. vatnode returns the PVN number plus, when available, the registry identifier filed with the national company registry.
How fast is Latvia VAT validation through vatnode?
Cached responses return in single-digit milliseconds. Live VIES lookups for Latvia typically complete in under one second; a 15-minute Redis cache is applied to identical VAT IDs.
Does the API work for Latvian sole traders and small businesses?
Yes. If a Latvian sole trader or small business is registered for PVN and listed in VIES, vatnode validates the number and returns the same response shape as for corporate entities. The valid field is true regardless of legal form.
Does vatnode handle VIES outages for Latvia?
vatnode caches recent VIES responses and surfaces a clear VIES_UNAVAILABLE error code with structured retry guidance. vatnode does not use a national validity fallback for Latvia — only the VAT register itself can confirm a VAT registration, so during a VIES outage validation defers to the cached result or returns the error for safe handling.
What is the consultation number returned for checks in Latvia?
The consultationNumber is the VIES requestIdentifier — a unique reference issued by the EU VIES service that proves the check was performed against the official EU register on a specific date. It is the EU's documented mechanism for "reasonable care" evidence under the reverse-charge rules and is returned once you set your own VAT as requester in dashboard Settings — including for Latvia.
More on Latvia
- Latvia VAT rates and historyCurrent standard and reduced rates, and every past change.
- Latvia VAT number formatNumber structure, regex pattern and verified examples.
- Latvia Reverse charge rulesWhen to zero-rate a cross-border B2B invoice, and what to write on it.
- Latvia VIES uptimeAvailability of this country in the Commission database, sampled continuously.
VAT APIs for Other EU Countries
See Also
- vatnode Quickstart — API key in 60 seconds
- VAT validation reference — endpoint, parameters, error codes
- Latvia VAT number format, rates, and verified examples
- Validate Latvia VAT numbers from AI agents (Claude, Cursor) via MCP
Building an AI workflow? vatnode is also available to AI agents through the official MCP server — Claude, Cursor and ChatGPT can validate Latvia VAT numbers and look up rates directly in chat.
Start Validating Latvia VAT Numbers
100 validations per month on the free plan, no credit card required. REST JSON over HTTPS, VIES consultation number on qualified checks, EU-hosted by default.