0.1.0 • Published 8 years ago

afm-info v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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: 'ΑΕ',
//      ...
//  }

License

MIT