PHP code example of ashleighsims / companies-house-api-wrapper

1. Go to this page and download the library: Download ashleighsims/companies-house-api-wrapper 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/ */

    

ashleighsims / companies-house-api-wrapper example snippets


AshleighSims\CompaniesHouseApiWrapper\Laravel\CompaniesHouseApiWrapperServiceProvider::class

'GetAddress' => AshleighSims\CompaniesHouseApiWrapper\Laravel\CompaniesHouseApiWrapperServiceProvider::class

use AshleighSims\CompaniesHouseApiWrapper\CompaniesHouseApiWrapper;
...

private $companiesHouse;

public function __construct(CompaniesHouseApiWrapper $companiesHouse) {
    $this->companiesHouse = $companiesHouse;
}

public function getAddress() {
    $response = $this->companiesHouse->registeredOfficeAddress()->get('00014259');
}

...

use AshleighSims\CompaniesHouseApiWrapper\Laravel\Facades\CompaniesHouseApiWrapper;

...

public function getAddress() {
    $response = CompaniesHouseApiWrapper::registeredOfficeAddress()->get('00014259');
}

...

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->search()->searchAll('Your Query Here'); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->search()->searchCompany("Deathstar Co"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->search()->searchOfficer("Luke Skywalker"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->search()->searchDisqualifiedOfficer("Finn FN-2187"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->companyProfile()->get("00014259"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->registeredOfficeAddress()->get("00014259"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->companyOfficers()->list("00014259"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->filingHistory()->get("00014259", "MzI1Mjg3MzI5MGFkaXF6a2N4"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->filingHistory()->list("00014259"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->insolvency()->get("00014259", "MzI1Mjg3MzI5MGFkaXF6a2N4"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->charges()->get("00014259", "D0ReqeVClRjR7C-o5ySBBRZnxvU"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->charges()->list("00014259"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->officerAppointmentList()->list("hLPe3meaIVQ0pqqn5AmvvS_V8pA"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->officerDisqualifications()->getNatural("Ff-EjRku_DxTJnG6uBq2ie8jmLc"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->officerDisqualifications()->getCorporate("Ff-EjRku_DxTJnG6uBq2ie8jmLc"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->ukEstablishmentCompanies()->list("00014259"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->personsWithSignificantControl()->list("00014259"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->personsWithSignificantControl()->getIndividual("06637776", "tRjwr1Q2U9uhtZ86JoeexAKF1Co"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->personsWithSignificantControl()->getCorporateEntities("00014259", "kISgW15ODWvznzBMq6Tv6ObCsLg"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->personsWithSignificantControl()->getLegalPersons("00014259", "a-legal-persons-officer-id"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->personsWithSignificantControl()->listStatements("00014259", "a-legal-persons-officer-id"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->personsWithSignificantControl()->getStatement("00014259", "statement-id"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->personsWithSignificantControl()->getSuperSecurePerson("00014259", "super-secure-id"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->companyRegisters()->get("00014259"); // Returns a json_decoded associative array

$companiesHouse = new CompaniesHouseApiWrapper('your-api-key', 'https://api.companieshouse.gov.uk/');
$response = $companiesHouse->companyExemptions()->get("00014259"); // Returns a json_decoded associative array