afm-info2

0.1.4 • Public • Published

afm-info npm version Build status

Retrieve information about a Greek tax registration number (AFM).

Λήψη πληροφοριών σχετικών με ένα ΑΦΜ.

Client to retrieve information related to a Greek tax registration number using a web service by the Greek Ministry of Finance. Instructions on how to create an account needed to use the service, terms of use, etc can be found on their site (in Greek language only).

Installation

npm install afm-info

Usage

const AfmInfo = require('afm-info');
 
// Last param is the AFM you make requests on behalf of.
const afmInfo = new AfmInfo('USERNAME', 'PASSWORD', '123456789');
 
// Get service version.
afmInfo.version()
  .then(console.log)
  .catch(console.error);
//> { result: 'Version: 3.1.0, 11/04/2014,...}
 
// Get info about a particular AFM.
afmInfo.info('090000045')
  .then(data => console.dir(data, {depth: null}))
  .catch(console.error);
//> {
//    RgWsPublicBasicRt_out: {
//      afm: '090000045',
//      postalAddressNo: '30',
//      doyDescr: 'Φ.Α.Ε. ΑΘΗΝΩΝ',
//      doy: '1159',
//      onomasia: 'ΔΗΜΟΣΙΑ ΕΠΙΧΕΙΡΗΣΗ ΗΛΕΚΤΡΙΣΜΟΥ ΑΝΩΝΥΜΗ ΕΤΑΙΡΙΑ',
//      legalStatusDescr: 'ΑΕ',
//      ...
//  }

Related

Other clients for this web service can be found at dspinellis/greek-vat-data.

License

MIT

Package Sidebar

Install

npm i afm-info2

Weekly Downloads

25

Version

0.1.4

License

MIT

Unpacked Size

14 kB

Total Files

5

Last publish

Collaborators

  • vparaskevas