validate_siret
Validates French SIRET numbers using the Luhn algorithm, extracting SIREN and establishment identifiers, and handling the La Poste special case automatically.
Instructions
Validates a French SIRET (14-digit company establishment number) using the official Luhn algorithm. The first 9 digits are the SIREN (company identifier) and the last 5 identify the specific establishment. Returns { valid: boolean, siren: string, establishment: string, siret: string }. Handles the La Poste special case automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siret | Yes | 14-digit French SIRET, with or without spaces/dashes. Example: '732 829 320 00074' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| siren | No | ||
| establishment | No | ||
| siret | No | ||
| reason | No |