Inscription d'un particulier
Pour remplir les champs vous devez consulter la documentation de l'Urssaf Documentation-API-TiersPrestation_v1.1.11.pdf partie "3.1 Méthode 010 - Inscrire un client".
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <token>");
var jsonData = {
"birthcountry": "",
"birthdepartment": "",
"birthcodeCommune": "",
"birthlibelleCommune": "",
"birthcodePostal": "",
"email": "",
"codeCommune": "",
"codePays": "",
"codePostal": "",
"libelleCommune": "",
"numeroVoie": "",
"lettreVoie": "",
"codeTypeVoie": "",
"libelleVoie": "",
"complement": "",
"lieuDit": "",
"civility": "",
"bic": "",
"iban": "",
"account_holder": "",
"birthday": "",
"lastname": "",
"firstname": "",
"lastname_usage": "",
"phone": "",
};
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: JSON.stringify(jsonData),
redirect: 'follow'
};
fetch("https://api.sinao.app/v1/apps/:appId/urssaf/register_customer", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Updated about 1 year ago