VID: Latvia VAT register
vidThe Latvian State Revenue Service publishes its VAT payer register as an open dataset on the national open data portal, served through a data store that can be queried for a single number. It is the leanest register in the fallback path: it carries names, an active flag, and no addresses at all.
VID is run by the Latvian State Revenue Service, and its data is published at data.gov.lv. It is one of the 10 national registers Avatcado consults on the Pro and Business plans when VIES cannot answer for Latvia, and it never replaces a VIES answer that does arrive. The national registry fallback guide covers the full precedence order.
What VID publishes
- The VAT numbers on the Latvian register, written with the LV prefix exactly as they appear on an invoice
- The registered name of each VAT payer, which a fallback answer returns as the company name
- An active flag per row, distinguishing a current registration from a historic one for the same number
- No addresses of any kind, which is why a Latvian answer carries a name and a null address
How Avatcado uses it
A Latvian fallback queries the data store for rows whose number equals the VAT number with its LV prefix restored, then looks for a row whose active flag is set. Only an active row produces an answer, served with source vid, the registered name, and a null address. Rows that exist but are all inactive describe a registration that has ended, which is a negative the register is not allowed to assert, so the request falls through to the cache.
VID answers per number, so Avatcado calls it while your request is open, with a 10 second timeout. There is no snapshot to go stale (queried live on the request), so a fallback answer reflects the register as it stood at that moment. If the register is slow or down as well, the request falls through to the cache.
The rule that matters most is that a register can only ever confirm a registration. A miss, whether VID says not registered or simply has no record, is never turned into valid: false: the request falls through to the stored result instead. An answer that does come from here carries source: "vid" and source_status: "fallback", and no consultation_number field at all, because only VIES issues those.
What a VID answer contains
| Field | VID |
|---|---|
| Company name | Yes |
| Company address | No |
| Consultation number | No, VIES only |
Data quirks worth knowing
- Register lists no natural persons and carries no addresses
- The same number can appear more than once when a registration has been ended and reopened, so the active row is the one that decides the answer
- Numbers are stored with the country prefix, unlike most registers in the fallback path, so the prefix has to be put back before the query is made
- The register covers registered VAT payers, so an answer says the number is on the Latvian register, not that it was checked against the EU-wide view VIES holds
Try it
Validating a Latvia VAT number takes the same call whichever source answers it. This one uses LV40003245752, a real registered number:
curl "https://api.avatcado.com/v1/validate?vat_number=LV40003245752" \
-H "Authorization: Bearer avat_live_your_api_key"import Avatcado from "@avatcado/node";
const avatcado = new Avatcado("avat_live_your_api_key");
const { data, error } = await avatcado.vat.validate({
vatNumber: "LV40003245752",
});
if (data?.meta.source === "vid") {
// VIES was unavailable; VID confirmed the registration.
console.log(data.meta.source_status); // "fallback"
}On an ordinary day that answer comes from VIES, with source_status: "live". Only when VIES cannot answer for Latvia does VID step in, and then meta.source_status reads "fallback" and meta.source reads "vid". The register fallback is included in the Pro and Business plans; the free tier covers 500 validations per month from VIES and the cache. Get an API key or read the API documentation.
Frequently asked questions
Does the Latvian VAT register include addresses?
No. The dataset the State Revenue Service publishes carries the VAT number, the registered name and the status of the registration, and that is all. There is no address column to read, so a Latvian fallback answer returns a company name with a null address rather than leaving the field to look like a failure. If your integration requires an address for every validated customer, treat Latvia as a country where that field can legitimately be absent during an outage, and rely on VIES for the complete record once the member state is answering again. The coverage page lists every country where company data is partial like this.
How does Avatcado know a Latvian VAT number is still active?
Each row in the published register carries a flag that says whether that registration is currently active, and the same number can appear more than once when a registration has been closed and later reopened. A Latvian fallback looks specifically for an active row rather than for any row at all, so a number whose only entries are historic does not produce a confirmation. Because a register is never allowed to assert a negative in the fallback path, that case is not returned as invalid either: the validation falls through to the stored result, and the response tells you that VIES was unavailable rather than claiming the number is bad.
Keep reading
Sources
- Latvian open data portal (VAT payer register dataset) Latvian State Revenue Service (VID), accessed September 4, 2026
- State Revenue Service of Latvia Latvian State Revenue Service (VID), accessed September 4, 2026