Documentation
Open workspace

Quickstart

A sandbox key, one request, and the evidence it returns.

This walkthrough uses a sandbox developer key. Sandbox answers come from fixed test data and never contact a tax authority. Live checks depend on your plan and the country.

Create a developer key

Keys are organization-owned and bound to one environment. Create one in the workspace under Integrations → Developer keys, choosing sandbox for this walkthrough and the scopes your integration needs.

  1. Choose the environment

    Sandbox for development with fixed test data; live for real checks within your plan. A key works in exactly one environment. Operations that accept only live are listed on the authentication page.

  2. Grant the narrowest scopes

    vat:validate for VAT checks, bulk:read and bulk:write for CSV bulk jobs (a VAT bulk job also needs vat:validate), history:read for saved checks, and company:search for company search and exact lookup. The authentication page lists every scope.

  3. Store it server-side

    Send it as Authorization: Bearer vat_… from your backend or the platform's secret store. Never embed a key in a URL, a mobile app, or a client-side bundle.

Make the first call

For new integrations, call POST /v1/vat/verify to verify a VAT identifier and POST /v1/companies/search to search companies. Send mode: "sandbox" for deterministic fixtures and Idempotency-Key so retries never double-bill.

curl --request POST \
  'https://api.vat.tools/v1/vat/verify' \
  --header 'Authorization: Bearer vat_REPLACE_WITH_A_SANDBOX_KEY' \
  --header 'Content-Type: application/json' \
  --header "Idempotency-Key: $(uuidgen)" \
  --data '{"vat_id":"DE100","mode":"sandbox","view":"full"}'

Sandbox number 100 is the valid fixture, so this call answers with status: "valid", a synthetic name and address, and synthetic evidence:

200 · application/json
{
  "schemaVersion": "public-delivery-2026-10-13",
  "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
  "status": "valid",
  "vat_id": "DE100",
  "country_code": "DE",
  "company": {
    "legal_name": "SYNTHETIC EXAMPLE COMPANY — NOT A REAL BUSINESS",
    "address": {
      "raw": "100 Sandbox Street — fictional address",
      "formatted": "100 Sandbox Street — Fictional Address, Germany",
      "country": "DE",
      "postal_code": null,
      "locality": null,
      "region": null,
      "street": "100 Sandbox Street — Fictional Address",
      "subdivision_code": null,
      "iso_subdivision": null,
      "street_line1": "100 Sandbox Street — Fictional Address",
      "street_line2": null,
      "components": {
        "street_category": null,
        "street_type": null,
        "street_type_english": null,
        "street_type_abbreviations": null,
        "street_name": "100 Sandbox Street — Fictional Address",
        "house_number": null,
        "house_number_addition": null,
        "unit": null,
        "district": null
      }
    }
  },
  "consultation": {
    "official_consultation_number": null,
    "internal_receipt_id": "00000000-0000-4000-8000-000000000001",
    "verified_at": "2026-10-13T12:00:00.000Z",
    "has_official_receipt": false,
    "is_audit_admissible": false,
    "source": {
      "name": null,
      "url": null,
      "evidenceRef": "evidence-1",
      "fields": [
        "vat_validity",
        "tax_id",
        "legal_name",
        "address"
      ],
      "observedAt": "2026-10-13T12:00:00.000Z",
      "retrievedAt": "2026-10-13T12:00:00.000Z",
      "sourceRecordUpdatedAt": null,
      "datasetPublishedAt": null,
      "datasetImportedAt": null,
      "datasetEffectiveAt": null,
      "category": "synthetic",
      "label": "Synthetic evidence"
    }
  },
  "quota": {
    "vat_eu_queries": {
      "cost": 1,
      "allowed": 100,
      "used": 1,
      "remaining": 99
    },
    "reverse_vat_lookups": {
      "cost": 0,
      "allowed": 20,
      "used": 0,
      "remaining": 20
    },
    "company_searches": {
      "cost": 0,
      "allowed": 200,
      "used": 0,
      "remaining": 200
    },
    "company_status_verifications": {
      "cost": 0,
      "allowed": 50,
      "used": 0,
      "remaining": 50
    },
    "resets_at": "2026-11-01T00:00:00.000Z"
  },
  "evidence": [
    {
      "id": "evidence-1",
      "source": {
        "name": null,
        "url": null,
        "evidenceRef": "evidence-1",
        "fields": [
          "vat_validity",
          "tax_id",
          "legal_name",
          "address"
        ],
        "observedAt": "2026-10-13T12:00:00.000Z",
        "retrievedAt": "2026-10-13T12:00:00.000Z",
        "sourceRecordUpdatedAt": null,
        "datasetPublishedAt": null,
        "datasetImportedAt": null,
        "datasetEffectiveAt": null,
        "category": "synthetic",
        "label": "Synthetic evidence"
      },
      "subject": {
        "taxJurisdiction": "DE",
        "vatPrefix": "DE",
        "vatIdentifier": "100",
        "authorityScope": "vat_registration",
        "kind": "vat_registration"
      },
      "environment": "sandbox",
      "attemptedAt": "2026-10-13T12:00:00.000Z",
      "servedAt": "2026-10-13T12:00:01.000Z",
      "completion": "complete",
      "warnings": []
    }
  ],
  "fieldTrust": [
    {
      "field": "vat_validity",
      "score": null,
      "assessment": "unassessed",
      "modelVersion": "field-trust-v1",
      "assessedAt": "2026-10-13T12:00:01.000Z",
      "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
      "observedPublisherGroups": 0,
      "effectiveCorrelationGroups": 0,
      "provenIndependentLineages": 0,
      "evidenceRefs": [],
      "reasons": [
        "insufficient_metadata"
      ]
    },
    {
      "field": "tax_id",
      "score": null,
      "assessment": "unassessed",
      "modelVersion": "field-trust-v1",
      "assessedAt": "2026-10-13T12:00:01.000Z",
      "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
      "observedPublisherGroups": 0,
      "effectiveCorrelationGroups": 0,
      "provenIndependentLineages": 0,
      "evidenceRefs": [],
      "reasons": [
        "insufficient_metadata"
      ]
    },
    {
      "field": "legal_name",
      "score": null,
      "assessment": "unassessed",
      "modelVersion": "field-trust-v1",
      "assessedAt": "2026-10-13T12:00:01.000Z",
      "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
      "observedPublisherGroups": 0,
      "effectiveCorrelationGroups": 0,
      "provenIndependentLineages": 0,
      "evidenceRefs": [],
      "reasons": [
        "insufficient_metadata"
      ]
    },
    {
      "field": "address",
      "score": null,
      "assessment": "unassessed",
      "modelVersion": "field-trust-v1",
      "assessedAt": "2026-10-13T12:00:01.000Z",
      "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
      "observedPublisherGroups": 0,
      "effectiveCorrelationGroups": 0,
      "provenIndependentLineages": 0,
      "evidenceRefs": [],
      "reasons": [
        "insufficient_metadata"
      ]
    }
  ]
}
Legacy /v1/validations compatibility

The compatibility endpoint POST /v1/validations remains supported for existing integrations, but new integrations should use POST /v1/vat/verify (see Compatibility & versioning). It returns a different envelope: branch on result.outcome (valid, invalid, source_unavailable or unsupported) and read usage for the settled meter and units.

curl --request POST \
  'https://api.vat.tools/v1/validations' \
  --header 'Authorization: Bearer vat_REPLACE_WITH_A_SANDBOX_KEY' \
  --header 'Content-Type: application/json' \
  --header "Idempotency-Key: $(uuidgen)" \
  --data '{"countryCode":"DE","vatNumber":"100","mode":"sandbox"}'
200 · application/json
{
  "schemaVersion": "public-delivery-2026-10-13",
  "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
  "operation": {
    "id": "00000000-0000-4000-8000-000000000001",
    "kind": "vat_validation",
    "status": "completed",
    "environment": "sandbox",
    "createdAt": "2026-10-13T12:00:00.000Z",
    "completedAt": "2026-10-13T12:00:00.000Z",
    "replayed": false
  },
  "subject": {
    "vatRegistration": {
      "taxJurisdiction": "DE",
      "vatPrefix": "DE",
      "vatIdentifier": "100",
      "authorityScope": "vat_registration"
    }
  },
  "usage": {
    "meter": "vat_validation",
    "unitsCharged": 1,
    "settlementReason": "completed"
  },
  "evidence": [
    {
      "id": "evidence-1",
      "source": {
        "name": null,
        "url": null,
        "evidenceRef": "evidence-1",
        "fields": [
          "vat_validity",
          "tax_id",
          "legal_name",
          "address"
        ],
        "observedAt": "2026-10-13T12:00:00.000Z",
        "retrievedAt": "2026-10-13T12:00:00.000Z",
        "sourceRecordUpdatedAt": null,
        "datasetPublishedAt": null,
        "datasetImportedAt": null,
        "datasetEffectiveAt": null,
        "category": "synthetic",
        "label": "Synthetic evidence"
      },
      "subject": {
        "taxJurisdiction": "DE",
        "vatPrefix": "DE",
        "vatIdentifier": "100",
        "authorityScope": "vat_registration",
        "kind": "vat_registration"
      },
      "environment": "sandbox",
      "attemptedAt": "2026-10-13T12:00:00.000Z",
      "servedAt": "2026-10-13T12:00:01.000Z",
      "completion": "complete",
      "warnings": []
    }
  ],
  "staleEvidence": [],
  "claims": [
    {
      "id": "claim-1",
      "type": "vat_validity",
      "outcome": "unknown",
      "effectiveFrom": null,
      "effectiveTo": null,
      "value": true,
      "expectedValue": true,
      "evidenceRefs": [
        "evidence-1"
      ],
      "reasons": [
        "partial_data_correlation"
      ]
    }
  ],
  "relationships": [],
  "conflicts": [],
  "issues": [],
  "fieldTrust": [
    {
      "field": "vat_validity",
      "score": null,
      "assessment": "unassessed",
      "modelVersion": "field-trust-v1",
      "assessedAt": "2026-10-13T12:00:01.000Z",
      "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
      "observedPublisherGroups": 0,
      "effectiveCorrelationGroups": 0,
      "provenIndependentLineages": 0,
      "evidenceRefs": [],
      "reasons": [
        "insufficient_metadata"
      ]
    },
    {
      "field": "tax_id",
      "score": null,
      "assessment": "unassessed",
      "modelVersion": "field-trust-v1",
      "assessedAt": "2026-10-13T12:00:01.000Z",
      "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
      "observedPublisherGroups": 0,
      "effectiveCorrelationGroups": 0,
      "provenIndependentLineages": 0,
      "evidenceRefs": [],
      "reasons": [
        "insufficient_metadata"
      ]
    },
    {
      "field": "legal_name",
      "score": null,
      "assessment": "unassessed",
      "modelVersion": "field-trust-v1",
      "assessedAt": "2026-10-13T12:00:01.000Z",
      "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
      "observedPublisherGroups": 0,
      "effectiveCorrelationGroups": 0,
      "provenIndependentLineages": 0,
      "evidenceRefs": [],
      "reasons": [
        "insufficient_metadata"
      ]
    },
    {
      "field": "address",
      "score": null,
      "assessment": "unassessed",
      "modelVersion": "field-trust-v1",
      "assessedAt": "2026-10-13T12:00:01.000Z",
      "disclosurePolicyVersion": "government-source-disclosure-v1-2026-10-13",
      "observedPublisherGroups": 0,
      "effectiveCorrelationGroups": 0,
      "provenIndependentLineages": 0,
      "evidenceRefs": [],
      "reasons": [
        "insufficient_metadata"
      ]
    }
  ],
  "result": {
    "kind": "vat_validation",
    "outcome": "valid",
    "vatNumber": "DE100",
    "name": "SYNTHETIC EXAMPLE COMPANY — NOT A REAL BUSINESS",
    "address": "100 Sandbox Street — fictional address",
    "evidenceRefs": [
      "evidence-1"
    ]
  }
}

Read the result

The verify response is one object. Branch on status, but keep the rest:

  • status: valid, invalid, unavailable, unknown or unsupported. Only valid and invalid come from the authority's own answer.
  • company.legal_name and company.address: the registered name and address when the authority returns them, otherwise null.
  • evidence[].source.observedAt: the original observation time, or null when none is established. Preserve it with the source record; retrieving or replaying an earlier result does not create a new observation.
  • fieldTrust: the current assessment for each field, its evidence references and assessment time. Anonymous remote agreement remains partial_correlation, capped at 60/100; synthetic or unassessed evidence has a null score. This is not whole-company or VAT assurance.
  • evidence[].source: only a reviewed government/public-authority service can have a disclosed name and URL. Other remote categories are anonymous with null name/URL; synthetic evidence is labelled synthetic. Keep source.attribution notices and references with the result when they are supplied.
  • quota and the X-Usage-Charged header: the allowance this call used and what remains. A replay charges 0.

Read the evidence model

Branch honestly

Most integration bugs are not transport bugs; they are outcome bugs. A checkout or an approval rule must never treat an unanswered source as a negative answer.

429 · RATE_LIMITED
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests. Try again later.",
    "rate_limit": {
      "limit": 1200,
      "window_seconds": 60,
      "retry_after_seconds": 60,
      "scope": "key"
    },
    "retryable": true,
    "request_id": "6f1c2b9e-3a4d-4c8e-9b7a-5d2e1f0a8c34"
  }
}
  • Continue on valid; flag or block only on an explicit invalid, under a policy the customer configured. Sandbox number 200 returns invalid, so you can test this path.
  • Route unavailable, unknown and unsupported to review, with their labels intact. Sandbox number 300 returns unavailable. Any number that is not a fixture is also unavailable.
  • Errors carry a registered code (for example INVALID_INPUT, SCOPE_FORBIDDEN, QUOTA_EXCEEDED or RATE_LIMITED) or the masked PUBLIC_DELIVERY_UNAVAILABLE, where the status carries the meaning. Check error.retryable before retrying. On 400, 401 or 403, correct the request, key, scope, organization or environment first.
  • On 429 RATE_LIMITED, wait for Retry-After, then retry with the same idempotency key and payload. Never retry QUOTA_EXCEEDED before error.allowance.resets_at. Trial allowances do not reset.
  • On 404, 409 or 410, inspect retained availability, conflict, selection, expiry or suppression before making a decision. On 500 or 503, no public result is established; source work may already have happened. Recover an uncertain operation with its original key.

Try company search in the sandbox

The sandbox also holds fictional French companies on the vat-tools-sandbox register, among them SYNTHETIC ATELIER EXEMPLE SAS and SYNTHETIC ATELIER EXEMPLE SARL. Send POST /v1/companies/search with country_code FR and a query that contains one of these words:

  • outage: Synthetic source outage. No company is returned and no unit is charged.
  • partial: Returns 100000004, whose name and address are not disclosed.
  • atelier: Returns the active 100000001 and the ceased 100000002.

Any other query, for example Acme, answers not_found and is still charged one sandbox unit. Sandbox fixtures lists every company and query.