PHP code example of ayctor / sireneapi
1. Go to this page and download the library: Download ayctor/sireneapi library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ayctor / sireneapi example snippets
use SireneApi\SireneApi;
$api = new SireneApi;
// Get all companies
$companies = $api->companies()->all();
// Get company by SIREN number
$company = $api->companies()->getBySiren('552081317');
// Get companies by other fields
$companies = SirenApi::companies()->getBy('code_postal', 77100);
// Get companies by other fields
$companies = $api->companies()->getBy([
'code_postal' => 77100,
]);
// Get all estabslishments
$establishments = $api->establishments()->all();
// Get establishments by SIREN number
$establishments = $api->establishments()->getBySiren('552081317');
// Get establishment by SIRET number
$establishment = $api->establishments()->getBySiret('55208131785027');
// Get establishments by other fields
$establishments = $api->establishments()->getBy('code_postal', 77100);
// Get establishments by other fields
$establishments = SirenApi::establishments()->getBy([
'code_postal' => 77100,
]);