Skip to content

mrcnpdlk/regon-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()