Liste des entreprises

Pour un explication de la hiérarchie, consulter la page Présentation de la rubrique Contacts

var myHeaders = new Headers();

myHeaders.append("Authorization", "Bearer <token>");

var app_id = 1; // votre app id
// pagination recommandée
var limit = 25 // valeur par défaut de 25
var offset = 0 // va prendre limit contacts à partir de 0

var request_params = `limit=${limit}&offset=${offset}`;

var requestOptions = {
		method: 'GET',
		headers: myHeaders,
		body: raw,
		redirect: 'follow'
};

fetch(`https://api.sinao.app/v1/apps/${app_id}/organizations?${request_params}`, requestOptions)
		.then(response => response.text())
		.then(result => console.log(result))
		.catch(error => console.log('error', error));
{
    "data": [
        {
            "id": 1,
            "name": "Client test",
            "billing_name": "Client test",
            "image": "/services/avatar/Clienttest/C",
            "legal_form": null,
            "country_iso2": "FR",
            "founding_date": null,
            "founding_location": null,
            "dissolution_date": null,
            "duns": null,
            "national_id": null,
            "tax_id": null,
            "vat_id": null,
            "code_naf": null,
            "number_of_employees": null,
            "slogan": null,
            "rcs": null,
            "greffe": null,
            "capital": null,
            "vat_system": null,
            "closeaccounting_period": null,
            "deleted_at": null,
            "created_at": "2021-09-30T15:44:50.000000Z",
            "updated_at": "2021-09-30T15:44:50.000000Z",
            "metadata": null,
            "sirene_data": null,
            "type": "organization"
        },
		...
		]
}