Code Monkey home page Code Monkey logo

gioiliop7 / aade-publicity-search-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from georgetomzaridis/aade-publicity-search-js

0.0 0.0 0.0 17 KB

Request publicity records (street, city, name, type, status etc.) from AADE (Independent Public Revenue Authority) about a company using their VAT number (AFM), powered by Javascript https://www.aade.gr/epiheiriseis/forologikes-ypiresies/mitroo/anazitisi-basikon-stoiheion-mitrooy-epiheiriseon

License: MIT License

JavaScript 100.00%

aade-publicity-search-js's Introduction

AADE Publicity Search

Request publicity records (street, city, name, type, status etc.) from AADE (Independent Public Revenue Authority) about a company using their VAT number (AFM), powered by Javascript.

Installation

Install aade-publicity-search with npm

  npm install aade-publicity-search

Find the package on NPM Registry

Usage/Examples

const getCompanyPublicityByAADE = require('aade-publicity-search')

// Pass only the VATID of the company that your want to search and the username/password for the authentication
getCompanyPublicityByAADE("vatid","user", "pass").then((data) => {
    // Do something with the data
});

// or pass the VATID that the request called by
getCompanyPublicityByAADE("vatid","user", "pass", "vatidcalledby").then((data) => {
    // Do something with the data
});


// or pass the VATID that the request called by
getCompanyPublicityByAADE("vatid","user", "pass", "vatidcalledby").then((data) => {
    // Do something with the data
});

// or maybe you want some debugging/logging each step
getCompanyPublicityByAADE("vatid","user", "pass", "vatidcalledby", true).then((data) => {
    // Do something with the data
});

Parameters

Name Type Required Description
search_vatid string Yes Company VATID that you want to request publicity records
aade_publicity_username string Yes AADE Publicity username that used for API call
aade_publicity_password string Yes AADE Publicity password that used for API call
searched_by_vatid string No Publicity records requested by VATID
debug boolean No Logging steps until finish, if you enable this

Data Return

Name Type Description
call_seq_id string AADE Call/Request ID
have_errors boolean This indicates if your request have any errors
errors_info.code string AADE Code error (can be null if no errors)
errors_info.descr string AADE Description error (can be null if no errors)
data object Results (can be null if we have errors)

Response Examples

// Success
[
  call_seq_id: '120746974',
  have_errors: false,
  errors_info: [ code: null, descr: null ],
  data: {
    afm: '123456789   ',
    doy: '1234',
    doy_descr: 'ΘΕΣΣΑΛΟΝΙΚΗΣ',
    i_ni_flag_descr: 'ΜΗ ΦΠ',
    deactivation_flag: '1',
    deactivation_flag_descr: 'ΕΝΕΡΓΟΣ ΑΦΜ          ',
    firm_flag_descr: 'ΕΠΙΤΗΔΕΥΜΑΤΙΑΣ      ',
    onomasia: 'ΔΟΚΙΜΑΣΤΙΚΗ ΕΤΑΙΡΕΙΑ ΑΝΩΝΥΜΗ ΕΤΑΙΡΕΙΑ',
    commer_title: 'ΔΟΚΙΜΑΣΤΙΚΗ ΕΤΑΙΡΕΙΑ',
    legal_status_descr: 'ΑΝΩΝΥΜΗ ΕΤΑΙΡΕΙΑ',
    postal_address: 'ΛΕΩΦΟΡΟΣ ΝΙΚΗΣ',
    postal_address_no: '55        ',
    postal_zip_code: '12345',
    postal_area_description: 'ΘΕΣΣΑΛΟΝΙΚΗ',
    regist_date: '2022-11-22',
    stop_date: null,
    normal_vat_system_flag: 'Y'
  }
]

// Errors

[
  call_seq_id: '120745719',
  have_errors: true,
  errors_info: [
    code: 'RG_WS_PUBLIC_TOKEN_USERNAME_NOT_AUTHENTICATED',
    descr: 'Ο συνδυασμός χρήστη/κωδικού πρόσβασης που δόθηκε δεν είναι έγκυρος.'
  ],
  data: null
]

Error Codes

Code Description
RG_WS_PUBLIC_TOKEN_USERNAME_NOT_AUTHENTICATED Wrong username/password
RG_WS_PUBLIC_WRONG_AFM Invalid VATID
RG_WS_PUBLIC_EPIT_NF VATID Searched, no business activity (before/now)

FAQ

How this library works?

It's very simple. The library just make a regular HTTP SOAP (XML) Request to AADE publicity endpoint, passing the required data, gather the response and parse it for easier usage.

How i can obtain an AADE publicity username / password?

You need to login with your taxisnet and obtain your username / password from this link

Who can use this library?

Everybody can use this library! But from the AADE side, access have only people that have/has income from business activities. More information you can find here

It's safe to put my credentials and use the library?

Of course it's safe and legal to use this library. For the credentials part, you can store it as enviromental values (.env file) and pass it through here for maximum security.

Support / Questions

For support, email [email protected]. Also you can buy me a coffee to thank me, i will not say no.

Bugs/Suggestions

For bugs/suggestions please open an issue so we can see it in more detail. Please put the necessary issue tags that describe your request before open an issue. Forking is free and cool for everyone too!

Tech Stack

Libraries: Axios

AADE Request Type: XML (SOAP)

License

You can use this library for personal or business usage and improve it freely.

Authors

aade-publicity-search-js's People

Contributors

georgetomzaridis avatar

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.