Migration v1 → v2
v2 doesn't break v1 — both coexist. You can migrate endpoint by endpoint at your own pace.
Coexistence
v1 endpoints (`/api/companies/*`, `/api/establishments/*`) remain available indefinitely. Your API keys and secrets work identically on both versions.
Route mapping
| v1 | v2 |
|---|---|
| GET /api/companies/{id} | GET /api/v2/enterprise/{num} |
| GET /api/companies/{id}/establishments | GET /api/v2/enterprise/{num}/establishments |
| GET /api/companies/{id}/financials | GET /api/v2/enterprise/{num}/financial |
| — | GET /api/v2/enterprise/{num}/activities |
| — | GET /api/v2/enterprise/{num}/address |
| — | GET /api/v2/enterprise/{num}/contact |
| — | GET /api/v2/enterprise/{num}/denominations |
| — | GET /api/v2/enterprise/{num}/roles |
| GET /api/establishments/{id} | GET /api/v2/establishment/{num} |
| — | GET /api/v2/naces?q=... |
| — | GET /api/v2/juridical-forms |
| — | GET /api/v2/denominations?q=... |
| — | GET /api/v2/vat/{vatNumber} |
| — | GET /api/v2/me |
| — | ALL /api/v2/webhook[s]/* |
Breaking changes
- URL prefix changes: `/api/companies/{id}` → `/api/v2/enterprise/{num}`.
- Sub-resources are now distinct endpoints (`/activities`, `/contact`, etc.) instead of nested fields.
- The response envelope `{success, data, timestamp}` stays identical.
Migration example
diff
# Avant (v1) - GET /api/companies/1033022383 + GET /api/v2/enterprise/1033022383 # Granularité v2 — fetch uniquement le contact + GET /api/v2/enterprise/1033022383/contact # Auth identique : mêmes headers X-API-Key + X-API-Secret