Ajouter un RIB à un particulier
Il est possible d'automatiser l'enregistrement du RIB d'un particulier dans un logiciel de comptabilité depuis Sinao grâce à l'API.
Pour commencer, il faut rechercher le particulier souhaité. Pour cela vous pouvez vous rendre sur cette page : https://docs.sinao.fr/docs/rechercher-un-client
Une fois le particulier récupéré, vous pouvez ajouter son RIB :
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <token>");
var formdata = new FormData();
formdata.append("payment_iban", "FR7630001007941234567890185");
formdata.append("payment_swift", "BDFEFRPPCCT");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: formdata,
redirect: 'follow'
};
fetch("https://api.sinao.app/v1/apps/:appId/relationships/:id", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
{
"id": 53,
"is_customer": null,
"is_supplier": null,
"is_prospect": null,
"main_contact_person": null,
"referring_commercial": null,
"importance_level": null,
"rating": null,
"is_notifying": null,
"note": null,
"contactplace": null,
"tags": [],
"discount": null,
"details": null,
"payment_swift": "BDFEFRPPCCT",
"payment_iban": "FR7630001007941234567890185",
"payment_period": null,
"payment_methods": null,
"metadata": null,
"created_at": "2023-10-18T07:46:01.000000Z",
"updated_at": "2023-10-23T12:31:36.000000Z",
"deleted_at": null,
"accounting_infos": {
"balance_initial_amount": null,
"reference": null,
"customer_id": null,
"supplier_id": null,
"accounting_number_customer": "411",
"accounting_number_supplier": "401"
},
"contact_type": "person"
}
Updated about 1 year ago