/kontur-fokus-api

Simple implementation of Kontur.Fokus API 3.0

Primary LanguagePHPMIT LicenseMIT

Контур.Фокус: API 3.0

Super-simple, minimum abstraction Контур.Фокус API 3.0 wrapper, in PHP.

Examples

Start by use-ing the class and creating an instance with your API key $apiKey

use Danbka\KonturFokusApi\KFApiClient;

$kfApi = new KFApiClient($apiKey, $settings);

$setting is the array like this:

$settings = [
    'format' => 'json|array|xml' // output format, default array
]

Let's go:

$result = $kfApi->loadResource('req', ['ogrn' => '0000000000000']);
$result = $kfApi->loadResource('excerpt', ['inn' => '0000000000']);
$result = $kfApi->loadResource('stat');

Available resources you can find here