Returns the full information from the Companies House database regarding the company number requested.
Language:
<!-- Import the Integr8 Ajax API -->
<!-- NOTE: Get your own API key to use in the following script tag from: -->
<!-- http://www.data-8.co.uk/integr8/Admin/Ajax.aspx -->
<script src="http://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key" type="text/javascript">
</script>
<script type="text/javascript">
function loadIntegr8() {
// Load the CompaniesHouse Integr8 service
data8.load('CompaniesHouse');
}
function GetCompanyDetails(companynumber) {
/// <param name="companynumber">string</param>
var companieshouse = new data8.companieshouse();
companieshouse.getcompanydetails(
companynumber,
null,
showGetCompanyDetailsResult
);
}
function showGetCompanyDetailsResult(result) {
// Check that the call succeeded, and show the error message if there was a problem.
if (!result.Status.Success) {
alert('Error: ' + result.Status.ErrorMessage);
}
else {
// TODO: Process method results here.
// Results can be extracted from the following fields:
// result.Result
// Contains the details found for the requested company on the companies house database.
}
}
loadIntegr8();
</script>
// NOTE: A reference to the web service must be added in Visual Studio with the URL
// http://webservices.data-8.co.uk/CompaniesHouse.asmx
private void GetCompanyDetails(string companynumber)
{
// Invoke the web service method.
CompaniesHouse proxy = new CompaniesHouse();
CompaniesHouseOutput results = proxy.GetCompanyDetails("username", "password", companynumber, null);
// Check that the call succeeded, and show the error message if there was a problem.
if ((results.Status.Success == false))
{
MessageBox.Show(("Error: " + results.Status.ErrorMessage));
}
else
{
// TODO: Process method results here.
// Results can be extracted from the following fields:
// result.Result
// Contains the details found for the requested company on the companies house database.
}
}
'NOTE: A reference to the web service must be added in Visual Studio with the URL
'http://webservices.data-8.co.uk/CompaniesHouse.asmx
Private Sub GetCompanyDetails(ByVal companynumber As String)
'Invoke the web service method.
Dim proxy As CompaniesHouse = New CompaniesHouse()
Dim results As CompaniesHouseOutput = proxy.GetCompanyDetails("username", "password", companynumber, Nothing)
'Check that the call succeeded, and show the error message if there was a problem.
If (results.Status.Success Is false) Then
MessageBox.Show(("Error: " + results.Status.ErrorMessage))
Else
'TODO: Process method results here.
'Results can be extracted from the following fields:
'result.Result
' Contains the details found for the requested company on the companies house database.
End If
End Sub
Public Sub GetCompanyDetails(companynumber As String)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "http://webservices.data-8.co.uk/recordset.ashx?service=CompaniesHouse&method=GetCompanyDetailsSimple" &
"&username=your-username" &
"&password=your-password" &
"&companynumber=" & companynumber
If rs.MoveFirst Then
If rs.Fields(0).Name = "Success" And rs.Fields(0).Value = false Then
MsgBox "Error: " & rs.Fields(1)
Else
'TODO: Process method results here.
'All the results are available in the first row in the recordset.
'Results can be extracted from the following fields:
'Result
' Contains the details found for the requested company on the companies house database.
End If
End If
End Sub
// NOTE: The php_soap.dll extension must be enabled in the php.ini file.
function GetCompanyDetails($companynumber)
{
$params = array(
"username" => "your-username",
"password" => "your-password",
"companynumber" => $companynumber,
"options" => $options
);
$client = new SoapClient("http://webservices.data-8.co.uk/CompaniesHouse.asmx?WSDL");
$result = $client->GetCompanyDetails($params);
if ($result->GetCompanyDetailsResult->Status->Success == 0)
{
echo "Error: " . $result->GetCompanyDetailsResult->Status->ErrorMessage;
}
else
{
// TODO: Process method results here.
// Results can be extracted from the following fields:
// $result->GetCompanyDetailsResult->Result
// Contains the details found for the requested company on the companies house database.
}
}