mrcnpdlk/regon-api

GUS Regon API

2.0.0 2020-03-21 21:34 UTC

This package is auto-updated.

Last update: 2022-01-22 02:00:50 UTC


README

Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads License

REGON API - Polish companies database v2

Installation

Install the latest version with composer

composer require mrcnpdlk/regon-api

API uses BIR 1.1

Basic usage

Configuration

Available options:

Parameter name Description Is required
password Password to REGON api YES
wsdl path to WSDL NO
location path do SVC location NO
cacheDir path do cache directory NO (system dir cache)
cacheTtl cache ttl [sec] NO (60 sec)

Creating instance

$oConfig = new Mrcnpdlk\Api\Regon\Config([
    'password' => 'my_password',
]);

$oNativeApi = new \Mrcnpdlk\Api\Regon\NativeApi($oConfig);
$oApi = new \Mrcnpdlk\Api\Regon\Api($oConfig);

NativeApi

NativeApi class implements native GUS methods such like:

  • Zaloguj()
  • Wyloguj()
  • GetValue(ValueEnum $param)
  • DaneSzukajPodmioty( string $regon = null, string $nip = null, string $krs = null, array $tRegon = [], array $tNip = [], array $tKrs = [])
  • DanePobierzRaportZbiorczy(string $date, ReportCompactEnum $report)
  • DanePobierzPelnyRaport(string $regon, ReportFullEnum $report)

Api

Api class implements usable methods based on NativeApi class.

  • searchByNip()
  • searchByKrs()
  • searchByRegon()
  • getPKD()
  • getReport()