NodeJS module to manipulate French SIREN / SIRET or VAT Number in either way. This module will also retrieve legals informations such as legal form, company name, capital and adress from valid SIRET, SIREN or VAT numbers.
Features included :
- Convert SIRET to VAT number
- Convert SIREN to VAT number
- Convert VAT number to SIREN
- Clean SIRET / Siret or VAT number form space between numbers
- Check if a number is a valid SIRET
- Check if a number is a valid SIREN
- Check if a number is a valid VAT number
- Return legals informations about the company coresponding to a given SIREN / SIRET or VAT number
- Return the name of the company coresponding to a given SIREN / SIRET or VAT number
- Return the adress of the company coresponding to a given SIREN / SIRET or VAT number
- Return the capital amount of the company coresponding to a given SIREN / SIRET or VAT number
- Return the legal form of the company coresponding to a given SIREN / SIRET or VAT number
- Return the last update recorded for the company coresponding to a given SIREN / SIRET or VAT number
npm install siren2tva --save
var siren2tva = require('siren2tva');
siren2tva({ longCode: true });
console.log(siren2tva.siret2tva('44997052400038'));
// Return FR26449970524
console.log(siren2tva.siren2tva('449970524'));
// Return FR26449970524
console.log(siren2tva.tva2siren('FR26449970524'));
// Return 449970524
console.log(siren2tva.check.isSIRET('44997052400038'));
// Return true
console.log(siren2tva.check.isSIRET('01234567890123'));
// Return false
console.log(siren2tva.check.isSIREN('449970524'));
// Return true
console.log(siren2tva.check.isSIREN('012345678'));
// Return false
console.log(siren2tva.check.isTVA('FR26449970524'));
// Return true
console.log(siren2tva.check.isTVA('FR00012345678'));
// Return false
siren2tva.getInfoNom('449970524', function (err, name) {
console.log(name);
});
// Return STARTX
siren2tva.getInfoAdress('449970524', function (err, adress) {
console.info(adress);
});
// Return { add: '171 Avenue Georges Clémenceau', cp: '92000', ville: 'Nanterre' }
siren2tva.getInfoCapital('449970524', function (err, capital) {
console.log(capital);
});
// Return 50005
siren2tva.getInfoLegal('449970524', function (err, legal) {
console.log(legal);
});
// Return SARL
siren2tva.getInfoLastUpdate('449970524', function (err, date) {
console.log(date);
});
// Return 2013-11-03
siren2tva.getInfo('449970524', function (err, company) {
return (err) ? console.error(err) : console.log(company);
});
// Return {company}
If you run into difficulties installing or running siren2tva, you can create an issue.
- Node.js - Runtime environement
- npm - Packet manager
- siret module - SIRET module by Steeve LEFORT
- firmAPI - French company information API
Read the contributing guide for details on our code of conduct, and the process for submitting pull requests to us.
This project is mainly developped by the startx dev team. You can see the complete list of contributors who participated in this project by reading CONTRIBUTORS.md.
This project is licensed under the Apache License Version 2.0 - see the LICENSE file for details