V3 Legal-Entities API
The V3 legal-entities API is deprecated. The following routes will stop responding starting from September 2026:
GET /api/v3/legalentitiesGET /api/v3/legalentities/{id}
V4 Establishments & Legal-Units APIs
The V4 APIs have no announced sunset date, but the Lucca API (V5) is the long-term strategic target.If you are on V3 and want a lower-friction interim step (same API-key authentication), you may migrate to V4 first —
but a future migration to the V5 Lucca API will still be required.
GET /organization/structure/api/establishmentsGET /organization/structure/api/legal-units
The V5 Lucca API business-establishments and legal-entities endpoints are stable and will not undergo breaking changes.
We recommend moving to the Lucca API as soon as possible to take advantage of its improved performance, richer data model,
and long-term support.
Understanding the Naming Change
In V3, thelegalentity resource bundled two concerns into one: the legal company (SIREN in France) and the physical
office site (SIRET in France). V4 separated these into legal-units and establishments.
The V5 Lucca API continues this separation but renames both resources:
| V3 | V4 | V5 (Lucca API) | Description |
|---|---|---|---|
legalentity | establishment | business-establishments | A physical site, office, or branch — identified by a SIRET in France |
legalentity.legalUnit (embedded) | legal-unit | legal-entity | The legal company structure — identified by a SIREN in France |
Before You Start: Switch to OAuth 2.0
Regardless of your starting version, the Lucca API requires an OAuth 2.0 bearer token in place of the legacy API key. Request the scope that matches your use case:| Operation | Required scope |
|---|---|
| Read business-establishments | business-establishments.readonly |
| Read legal-entities | legal-entities.readonly |
Api-Version: 2024-11-01 HTTP header.
Authentication
How to obtain and use OAuth 2.0 bearer tokens with the Lucca authorization server.
Versioning
How to use the
Api-Version header to specify the API version.Pick Your Starting Version
- Migrating from V3 Legal-Entities
- Migrating from V4 Establishments
Quick Start
Get an OAuth 2.0 token
Request a bearer token with the
business-establishments.readonly scope (add legal-entities.readonly if you also need the parent legal company). See the auth section above.Replace the list endpoint
Swap
GET /api/v3/legalentities?paging=0,1000 for GET /lucca-api/business-establishments?include=links,embedded. Page through results using the cursor token in links.next.Update your data model
Refer to the field mapping reference below for all changes. Remember that V3
legalentity maps to V5 business-establishment.Retrieve the parent legal company separately
V3 embedded the
legalUnit inside the legalentity object. In V5, use the legalEntity reference on business-establishments and either request ?include=embedded to inline the legal-entity, or call GET /lucca-api/legal-entities/{id} directly.What Changes
- Resource renamed: V3
legalentity→ V5business-establishment. The V5legal-entityis a different resource (the parent company). - Authentication: V3 uses a proprietary API key; the Lucca API uses OAuth 2.0 bearer tokens.
- Versioning: requests must include the
Api-Version: 2024-11-01HTTP header. code→remoteId: renamed for consistency.isActive→isArchived: the boolean is semantically inverted.legalIdentificationNumber→taxIdentificationNumber: now a structured{ format, value }object instead of a plain string.activityCode→industryCode: now a structured{ format, value }object.countryID/countrymoved: country information is now on the parentlegal-entity, not on the business-establishment.- IDs become strings: integers in V3 (
1), strings in V5 ("1"). - No embedded
users/currentUsers/roles: query the employees endpoint instead. - Pagination: V3 used
?paging={offset},{limit}; the Lucca API uses cursor tokens. Max 100 items per page (default 25). addressrestructured: V3 hadstreet/zipCode/city; V5 usesaddressLines/postalCode/locality/administrativeArea/countryCode.- New fields:
isHeadquarters,lastArchivedAt,lastUpdatedAt,links.
Pagination
How cursor-based pagination works in the Lucca API.
Notable Breaking Changes
Resource name changed from legalentity to business-establishment
This is the most critical change. The V3 “legal entity” is not the V5 “legal entity” — it maps to the V5 business-establishment. Update all endpoint URLs accordingly:| V3 | V5 |
|---|---|
GET /api/v3/legalentities | GET /lucca-api/business-establishments |
GET /api/v3/legalentities/{id} | GET /lucca-api/business-establishments/{id} |
isActive is now isArchived (inverted semantics)
| V3 | V5 | Meaning |
|---|---|---|
isActive: true | isArchived: false | Establishment is in use |
isActive: false | isArchived: true | Establishment is no longer in use |
IDs became strings in V5
legalIdentificationNumber became taxIdentificationNumber — a structured object
In V3, legalIdentificationNumber was a plain string (e.g. the French SIRET code). In V5, it is a structured object with a format discriminator:format field can be "franceSIRET", "spainNIF", or "other".activityCode became industryCode — a structured object
Same pattern as above:format field can be "franceAPE", "spainCNAE", "germanyWZ", "usaNAICS", or "other".code renamed remoteId
Map V3 code to V5 remoteId. Use it for external identifiers.address restructured
street→addressLines(array, supports multiple lines)zipCode→postalCodecity→localityadministrativeAreaandcountryCodeare new fields
Country and currency information moved to the parent legal-entity
V3 had countryID, country, and currency details on the legal entity (now business-establishment). In V5, this information lives on the parent legal-entity resource. Use the business-establishment’s legalEntity reference to retrieve it:?include=embedded on the business-establishment request to get the legal-entity inlined.Embedded users, currentUsers, and roles fields were removed
V3 legal-entity objects included full user and role lists. These are no longer available on business-establishment objects. Query the employees endpoint instead.Migration by Use Case
1. List All Establishments
2. Retrieve an Establishment by ID
3. Filter by Active / Archived Status
| Intent | V3 | V5 |
|---|---|---|
| Active only | isActive: true on response (filter client-side) | ?isArchived=false |
| Inactive only | isActive: false on response (filter client-side) | ?isArchived=true |
| All | All returned by default | Same behavior (omit isArchived) |
4. Get the Parent Legal Company
V3 embeddedlegalUnit directly on the legal-entity object. In V5, the parent legal company is a separate resource:5. Find Employees in an Establishment
V3 embeddedusers and currentUsers directly on the legal-entity object. In V5, query the employees endpoint:Field Mapping Reference
| V3 legalentity field | V5 business-establishment field | Notes |
|---|---|---|
id | id | String in V5 (integer in V3) |
| (new in V5) | type | Always "business-establishment" |
url | url | Self-link URI |
name | name | |
code | remoteId | Renamed |
countryID | (moved) | Now on the parent legal-entity as countryCode (ISO 3166 alpha-3) |
country | (moved) | Now on the parent legal-entity |
newCountryId | (removed) | Use the parent legal-entity’s countryCode |
newCountry | (removed) | Use the parent legal-entity |
legalUnitId | legalEntity.id | Now a typed { id, type, url } reference |
legalUnit | (embedded) | Use ?include=embedded or query /lucca-api/legal-entities/{id} |
legalIdentificationNumber | taxIdentificationNumber | Now { format, value } — format: "franceSIRET", "spainNIF", or "other" |
(from country) activityCode | industryCode | Now { format, value } on the business-establishment; also available on the parent legal-entity |
isActive | isArchived | Semantics inverted |
timeZoneId | timezoneId | Casing changed |
address.street | address.addressLines | Array of strings instead of single string |
address.zipCode | address.postalCode | Renamed |
address.city | address.locality | Renamed |
| (new in V5) | address.administrativeArea | Region / state |
| (new in V5) | address.countryCode | ISO 3166 alpha-3 country code |
| (new in V5) | isHeadquarters | Whether this is the headquarters of its legal-entity |
modifiedOn | lastUpdatedAt | Renamed |
| (new in V5) | createdAt | |
| (new in V5) | lastArchivedAt | |
users | (removed) | Query the employees endpoint |
currentUsers | (removed) | Query the employees endpoint with status=active |
roles | (removed) | Not available in V5 |
modifiedByID / modifiedBy | (removed) | Not available in V5 |
authorizedOperations / authorizedActions | (removed) | Not available in V5 |
Migrating V4 Legal-Units to V5 Legal-Entities
If you were using V4legal-units, the migration to V5 legal-entities is also needed.
| V4 | V5 |
|---|---|
GET /organization/structure/api/legal-units | GET /lucca-api/legal-entities |
What Changes
- Resource renamed: V4
legal-unit→ V5legal-entity. name→legalName: the field is renamed to clarify it is the legal name of the entity.code→remoteId: renamed for consistency.countryId(ISO alpha-2) →countryCode(ISO alpha-3): changed from"FR"to"FRA".legalIdentificationNumber→taxIdentificationNumber: now a structured{ format, value }object.activityCode→industryCode: now a structured{ format, value }object.headquartersIdremoved: the headquarters information is now on the business-establishment side (isHeadquarters: true).countryobject removed: replaced bycountryCodeandcurrencyCodetop-level fields.- IDs are strings: integers in V4 (
3), strings in V5 ("3"). - New fields:
currencyCode,links.businessEstablishments,lastArchivedAt,lastUpdatedAt.
Field Mapping Reference
| V4 legal-unit field | V5 legal-entity field | Notes |
|---|---|---|
id | id | String in V5 (integer in V4) |
| (new in V5) | type | Always "legal-entity" |
| (new in V5) | url | Self-link URI |
name | legalName | Renamed |
code | remoteId | Renamed |
countryId (alpha-2) | countryCode (alpha-3) | Changed from "FR" to "FRA" |
country (object) | (removed) | Replaced by countryCode and currencyCode |
| (from country) | currencyCode | Top-level field in V5 (e.g. "EUR") |
legalIdentificationNumber | taxIdentificationNumber | Now { format, value } — format: "franceSIREN", "spainNIF", "germanySN", or "other" |
activityCode | industryCode | Now { format, value } |
headquartersId | (removed) | Check isHeadquarters on business-establishments instead |
isArchived | isArchived | Same semantics |
createdAt | createdAt | |
| (new in V5) | lastUpdatedAt | |
| (new in V5) | lastArchivedAt | |
| (new in V5) | links.businessEstablishments | Pre-built link to business-establishments belonging to this entity |
Further Reading
Lucca API Introduction
Overview of the Lucca API, versioning, and pagination.
V5 Business-Establishment Reference
Full reference for the Lucca API business-establishment resource.
V5 Legal-Entity Reference
Full reference for the Lucca API legal-entity resource.
Authentication
How to obtain and use OAuth 2.0 bearer tokens.
Pagination
Cursor-based pagination in the Lucca API, with examples.
Rate Limits
Rate and size limits applied to the Lucca API.