Newline Pending Merge

    bir1
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.6 • Public • Published

    BIR1 - GUS REGON client

    Simple node.js client library to Statistics Poland (GUS) information about companies api REGON

    Install

    npm i bir1

    Usage

    import Bir from 'bir1'
    
    const bir = new Bir()
    await bir.login()
    console.log(await bir.search({ nip: '5261040567' }))
    
    /*
    output: 
    
    {
      regon: '011417295',
      nip: '5261040567',
      statusNip: null,
      nazwa: 'T-MOBILE POLSKA SPÓŁKA AKCYJNA',
      wojewodztwo: 'MAZOWIECKIE',
      powiat: 'Warszawa',
      gmina: 'Mokotów',
      miejscowosc: 'Warszawa',
      kodPocztowy: '02-674',
      ulica: 'ul. Marynarska',
      nrNieruchomosci: '12',
      nrLokalu: null,
      typ: 'P',
      silosID: '6',
      dataZakonczeniaDzialalnosci: null,
      miejscowoscPoczty: 'Warszawa'
    }
    */

    API

    constructor

    new Bir(options?)

    Parameters

    Name Type Notes
    options Object
    options.key? string production API key

    Note: by default it connects to non production GUS database using public default key. In order to connect to production database with current company data provide a key granted by GUS.

    login

    login(): Promise<void>

    Returns

    Promise<void>


    search

    search(query): Promise<any>

    Parameters

    Name Type Notes
    query Object
    query.nip? string
    query.regon? string

    Returns

    Promise<any>


    report

    report(query): Promise<any>

    Parameters

    Name Type Notes
    query Object
    query.regon string
    query.report string e.g.: BIR11OsPrawna

    See BIR1 original documentation for more report types.

    Returns

    Promise<any>


    value

    value(value): Promise<string>

    Parameters

    Name Type
    value string

    Returns

    Promise<string>

    Install

    npm i bir1

    DownloadsWeekly Downloads

    69

    Version

    1.2.6

    License

    MIT

    Unpacked Size

    18.2 kB

    Total Files

    25

    Last publish

    Collaborators

    • pawel-id