Giter VIP home page Giter VIP logo

eu-vat-info's Introduction

Check EU VAT info

This module does a request to https://ec.europa.eu to fetch trader information for a given VAT number and country code.

Usage

Installation

npm install eu-vat-info
// or
yarn add eu-vat-info

Quick Start

const EuVatInfo = require('eu-vat-info');

const response = await EuVatInfo({ 
  countryCode: 'EL', 
  vatNumber: '123456789' 
})

Options

Option Type Required
countryCode string ex. DE, IT, SE true
vatNumber string true

Response

Field Type Optional
status "success" or "error" false
error { name: EUVatError, message: string } true
info EUVatInfo true

Example response

{
  status: 'success',
  info: {
    countryCode: 'EL',
    vatNumber: '12345678',
    requestDate: '2021-09-24+02:00',
    valid: true,
    traderName: 'TRADER NAME',
    traderCompanyType: 'COMPANY TYPE',
    traderAddress: 'ADDRESS, ZIP, ATHENS'      
  }
}

EUVatInfo

countryCode: string;
vatNumber: string;
requestDate: string;
valid: boolean;
traderName: string;
traderCompanyType: string;
traderAddress: string;

EUVatError

INVALID_EU_CODE
INVALID_VAT_NUMBER
SERVER_ERROR
PARSE_ERROR

eu-vat-info's People

Contributors

stubbies avatar

Stargazers

 avatar

Watchers

 avatar

eu-vat-info's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.