Closed alexsegura closed 1 month ago
It can be validated without an API call, as SIRET numbers consist of 14 digits and SIREN numbers contain 9 digits. Both SIRET and SIREN include a control digit that can be verified using a checksum algorithm, which can be found here: https://portal.hardis-group.com/doccenter/pages/viewpage.action?pageId=120357227.
It's already validated using the Luhn algorithm. But this does not indicate if the number is head office or not.
When sending SIRETs to Edenred for sync, it sometimes fails because people configure the head office's number, which is unknown to Edenred.
We should use one of the SIRENE APIs to validate the SIRET number.