Get company
Get company is used to retrieve companies full details. Get a company by functional id (company or establishment number) and retrieve full information: legal information, location, financial details...
Specifications
- search for company by company or establishment number
- use SIREN or SIRET for France
- define expected fields
Examples
The "Sparklane" company can be found:
- By company number "508965993", returns head office
- By establishment number "50896599300027"
Interface
Specification
URL
https://api.sparklane.fr/v5/companies/fr/{key}
Parameters
In-query parameters:
- key (required / string) Company or establishment number
- fields (optional / string array) Result's fields in response
Response
Company details
Default fields :
- uniqueId Sparklane id (unique across datasources)
- compNumber Company number (unique for a datasource)
- estNumber Company head establishment number
- name Legal company names
- zip Company head location zip code
- town Company head location town
Additional fields :
- activityId Activity id (ie. Code NAF for France)
- activityLabel Activity label (ie. NAF label for France)
- address Establishment full address
- address1 Establishment address first line
- address2 Establishment address second line
- address3 Establishment address third line
- address4 Establishment address fourth line
- administrativeArea1Id Administrative area first level id (ie. Code région for France)
- administrativeArea1Label Administrative area first level label (ie. Région for France)
- administrativeArea2Id Administrative area second level id (ie. Code département for France)
- administrativeArea2Label Administrative area second level id (ie. Département for France)
- capital Company capital
- consolidatedEmployeeNumber Total employee number for companie’s group
- consolidatedTurnover Total turnover for companie’s group
- country Country code (ie. FR for France)
- currency Country currency (ie. EUR for France)
- employeeNumber Total employee number for companie’s establishments
- establishmentCount Number of establishments
- estEmployeeNumber Establishment employee number
- financialScore Financial score (ie. VERT / ORANGE / ROUGE / LIQUIDATION for France)
- foreignShareholder Number of foreign shareholders
- foreignSubsidiary Number of foreign subsidiaries
- head True if establishment is the head of company
- isTopParent True if company is the head of group
- latitude Latitude
- legalFormGroupId Legal form group id (ie. Référentiel INSEE for France)
- legalFormGroupLabel Legal form group label (ie. Référentiel INSEE for France)
- legalFormId Legal form id (ie. Référentiel INSEE for France)
- legalFormLabel Legal form label (ie. Référentiel INSEE for France)
- longitude Longitude
- nic Establishment number
- phone Establishment phone
- phoneHead Company head establishment head
- registrationDate Registration date
- townCode Town code (ie. Référentiel INSEE for France)
- turnover Total turnover for companie’s establishments
- turnoverDate Last published turnover date
- ultimateHeadCompNumber Head of group company number
- ultimateHeadName Head of group company name
- vatNumber VAT number
Code samples
Bash CURL
Request |
|
---|---|
Response |
|
HTML/Javascript
<div>
<label for="siren">SIREN : </label><input type="text" name="siren">
<label for="nom">Nom : </label><input type="text" name="nom">
<label for="ville">Ville : </label><input type="text" name="ville">
<label for="ca">CA : </label><input type="text" name="ca">
<input type="button" name="getCompany" value="Get company">
</div>
<!-- Import JQuery UI library (see https://jqueryui.com/) -->
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css">
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
// Use JQuery UI autocomplete (see https://jqueryui.com/autocomplete/)
$("input[name=getCompany]").click(function() {
$.ajax({
// Call Sparklane API with company number
url : "https://api.sparklane.fr/v5/companies/fr/"
+ $("input[name=siren]").val()
+ "?fields=name&fields=town&fields=turnover",
// Set Basic auth header
beforeSend: function (xhr) {
xhr.setRequestHeader ("Authorization", "Basic " + YOUR_TOKEN);
},
success : function(data) {
// Use response
$("input[name=nom]").val(data.name);
$("input[name=ville]").val(data.town);
$("input[name=ca]").val(data.turnover);
}
});
});