JSPM

vericorp

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q17784F
  • License MIT

Official TypeScript SDK for the VeriCorp API — European company verification and VAT validation

Package Exports

  • vericorp

Readme

vericorp

Official TypeScript/JavaScript SDK for the VeriCorp API — European company verification and VAT validation.

Install

npm install vericorp

Quick Start

import { VeriCorp } from "vericorp";

const client = new VeriCorp({ apiKey: "your-rapidapi-key" });

// Lookup a company
const company = await client.lookup("PT502011378");
console.log(company.name); // "UNIVERSIDADE DO MINHO"

// Validate a VAT number
const result = await client.validate("DK10150817");
console.log(result.vat_valid); // true

// Batch lookup (up to 10)
const batch = await client.batch(["PT502011378", "DK10150817"]);
console.log(batch.results);

API

new VeriCorp(options)

Option Type Default Description
apiKey string required Your RapidAPI key
timeout number 10000 Request timeout in ms
maxRetries number 2 Retries on 429/503

Methods

  • lookup(taxId, options?) — Full company data by tax ID
  • lookupGB(companyNumber, options?) — UK company by company number
  • validate(taxId) — Format + VIES VAT validation
  • batch(taxIds) — Batch lookup (max 10)
  • countries() — List supported countries
  • health() — API health status

Error Handling

import { VeriCorp, NotFoundError, RateLimitError } from "vericorp";

try {
  await client.lookup("PT000000000");
} catch (err) {
  if (err instanceof NotFoundError) {
    console.log("Company not found");
  } else if (err instanceof RateLimitError) {
    console.log("Rate limited, try again later");
  }
}

License

MIT