Liste des particuliers

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}/persons?${request_params}`, requestOptions)
		.then(response => response.text())
		.then(result => console.log(result))
		.catch(error => console.log('error', error));
    
{
    "data": [
        {
            "id": 1,
            "civility": "M",
            "lastname": "xxx",
            "firstname": "Martin",
            "image": "/services/avatar/xxx/MX",
            "deleted_at": null,
            "created_at": "2021-10-11T13:38:42.000000Z",
            "updated_at": "2021-10-11T13:38:42.000000Z",
            "metadata": null,
            "civil_name": "M xxx",
            "name": "Martin XXX",
            "initials": "MX",
            "type": "person"
        },
		...
  ]
}