搜索和检索公司


require('vendor/autoload.php');
use Emis\Http\Client;
use Emis\Company\Api\Proxy\Search;
use Emis\Company\Api\Proxy\Companies;

$client = new Client();
$client->setApi(Client::COMPANY_API);
$client->setToken("YOUR_TOKEN");

//Search for a company named 'ABB Bulgaria EOOD' in Bulgaria by using the "Search" class and filters.
$search = new Search($client);
$filter = array();
$filter[] = "country:BG";
$filter[] = "name:ABB Bulgaria EOOD";
$result = $search->queryCompany($filter);

//Get the isic code of the first company in the result.
$isic = $result->getResultList()[0]->getIsic();

//Get extended information for the company by using the "Companies" class.
$companies = new Companies($client);
$company = $companies->getFullCompany($isic);
var_export($company);