Documentation Index
Fetch the complete documentation index at: https://developers.lucca.fr/llms.txt
Use this file to discover all available pages before exploring further.
What Are Employee Attributes?
The employee data model in the Lucca API is spread across several primary resources:employee, employee-personal-record, employment, and job-position. Each carries a set of system built-in properties defined by Lucca (e.g. employee.givenName, personal.legalGender, jobPosition.manager). In addition, your organization can define its own custom properties (e.g. a “T-shirt size” field) and attach them to any of these primary resources.
In practice, this means a single piece of information about an employee may live on any of these resources, as either a system or custom property.
Employee attributes provide a single, uniform endpoint to access any property — system built-in or custom — from any primary API resource, regardless of where it is stored.
An employee-attribute is the value of one specific property for one specific employee. Each attribute is described by an employee-attribute-definition, which declares what the property is, what type it carries, and which primary resource it targets (employee, employment, or job-position).
System built-in properties (e.g.
employee.givenName, jobPosition.manager) are read-only through this endpoint. To update them, use the write endpoints of the corresponding primary resource (e.g. PATCH /lucca-api/employees/{id}).Custom properties (e.g. e_tShirtSize, e_children) are exclusively managed — only read as of now — through the employee-attributes and employee-attribute-definitions endpoints. There is no other API endpoint for them.Key Concepts
Definitions vs. Values
Employee attributes unify two kinds of properties into a single model:- System built-in properties that Lucca defines on primary resources (e.g.
employee.givenName,jobPosition.manager). - Custom properties that your organization creates and attaches to a primary resource (e.g.
e_tShirtSize).
employee-attribute-definition
Describes a property: its
id, human-readable name, the JSON schema of its value, and the targetType (employee, employment, or job-position) indicating which primary resource it belongs to. Definitions are either provided by Lucca (for system properties) or created by your organization (for custom properties).employee-attribute
The actual value of a definition for a given employee. Contains the
value itself, a reference to its definition, the employee it belongs to, and an applicability window indicating the date range over which the value is valid.System vs. Custom Attributes
Although both appear asemployee-attribute values, system and custom attributes differ in how they are managed:
| System | Custom | |
|---|---|---|
| Origin | Defined by Lucca. Present on every account. | Created by your organization to fit your needs. |
| Examples | employee.givenName, employee.birthDate, jobPosition.manager, jobPosition.department | e_tShirtSize, e_favoriteColor, e_children |
| Read via | Primary resource endpoints or employee-attributes | employee-attributes |
| Write via | Primary resource endpoints (e.g. PATCH /lucca-api/employees/{id}) | Not implemented yet |
| Definition managed by | Lucca — always present, cannot be modified. | Your organization, via employee-attribute-definitions. |
Applicability
Because many attributes come from time-bounded resources likeemployment or job-position, each employee-attribute exposes an applicability window:
startis the inclusive lower bound.nullmeans “since the beginning of time”.endis the inclusive upper bound.nullmeans “until the end of time”.- For attributes without a temporal dimension (e.g.
employee.givenName,e_tShirtSize), both bounds arenull, meaning the value applies indefinitely.
?applicability.asOf={date} query parameter to filter attributes to those valid on a specific date — for example, to retrieve the state of an employee on their first day.
Multiple Values
Some definitions support multiple values per primary resource (e.g. “employee’s children”, where the same employee may have several entries). ThemultipleValueHandling property on the definition describes this behavior:
null→ single-valued: at most one attribute per employee for this definition.- non-null → multi-valued: multiple attributes per employee are allowed, with a
sortingdirection and optionalsortingPropertyto order them.
Access
OAuth Scopes
| Scope | Access |
|---|---|
employee-attribute-definitions.readonly | Read attribute definitions. |
employee-attribute-definitions.readwrite | Read, create, update, and delete attribute definitions. |
employee-attributes.readonly | Read attribute values. |
employee-attributes.readwrite | Read, create, update, and delete attribute values. |
HR File Sections and Business Establishments
Beyond OAuth scopes, two additional constraints apply when reading employee attributes:- Business establishments: you may only access attributes of employees whose applicable business establishment (see
employee.applicableJobPosition.businessEstablishment) is accessible to your client application. - HR file sections: each attribute definition is associated with an employee hr file section. Sections are not exposed by the v5 Lucca API but are visible in the user interface. Your integration may only access attributes belonging to sections explicitly granted to it (see below).
Granting access to hr file sections
When configuring your OAuth client, theemployee-attributes.readonly (or .readwrite) scope requires you to select the specific hr file sections your integration can read. Only attributes attached to one of the selected sections will be returned by the API.
Common Workflows
1. Discover Available Definitions
Before reading values, you may want to discover which attribute definitions exist on the account.| Parameter | Description |
|---|---|
id | Filter by one or more definition IDs (comma-separated, max 100). |
search | Find definitions whose name starts with the given string. |
isArchived | Filter by archival status. |
sort | Sort by id, name, or createdAt (prefix with - to reverse). |
targetType tells you which underlying resource the value comes from:
targetType | Source |
|---|---|
employee | A system or custom property attached to the employee resource |
employment | A system or custom property attached to the employment resource |
job-position | A system or custom property attached to the job-position resource |
2. Read Attributes for a Specific Employee
To fetch all current attribute values for a given employee, filter byemployee.id and supply an applicability.asOf date:
| Query parameter | Description |
|---|---|
employee.id | Filter by employee ID(s) (comma-separated, max 100). |
definition.id | Filter by definition ID(s) — useful when you only need specific fields. |
applicability.asOf | Only return attributes whose applicability window includes this date. |
value | Filter by value. Supports dot-notation for object schemas (e.g. value.e_childGivenName=John). |
sort | Sort by id, createdAt, value, or definition.id. |
Filtering on value
The value query parameter lets you filter attributes by their actual value. For scalar values (strings, booleans, numbers), pass the value directly:
schema.type is "object"), use dot-notation to target a specific sub-property of the value:
Filtering on
value performs a strict equality check. Partial matches and range filters are not supported.3. Read a Single Attribute
When you already know the attribute’sid, retrieve it directly:
Understanding the value Property
The value type depends on the schema declared on the associated definition. Below are the most common schemas and their corresponding JSON representations:
Schema $id | JSON type of value | Example |
|---|---|---|
/lucca-api/schemas/short-text | string | null | "Software Engineer" |
/lucca-api/schemas/long-text | string | null | "Lorem ipsum..." |
/lucca-api/schemas/boolean | boolean | null | true |
/lucca-api/schemas/int32 | number | null | 42 |
/lucca-api/schemas/decimal | number | null | 1.5 |
/lucca-api/schemas/legacy-date | string | null | "2025-01-01T00:00:00" |
/lucca-api/schemas/email | string | null | "jdoe@example.org" |
/lucca-api/schemas/employee-reference | object | null | {"id": "416", "type": "employee", ...} |
/lucca-api/schemas/taxonomy-label-reference | object | null | {"id": "545", "type": "taxonomy-label", ...} |
object-typed schemas, the value is a JSON object whose properties each follow their own referenced schema. Use the definition’s propertyDescriptions to discover and label each sub-property.
Example: Multi-valued Object Attribute (Children)
This example walks through a custom attribute representing an employee’s dependent children. Because an employee may have several children, the definition usesmultipleValueHandling to allow multiple values and declare how they should be sorted.
The Definition
multipleValueHandlingis non-null — multipleemployee-attributerecords can exist for the same employee under this definition (one per child).sortingProperty: "e_childBirthDate"— clients should display children sorted by their birth date in ascending order.propertyDescriptions— provides human-readable labels and translation keys for each object property, useful when building a UI.
The Corresponding Attributes
QueryingGET /lucca-api/employee-attributes?employee.id=416&definition.id=e_children returns one item per child:
Paginating Results
Like all collection endpoints,/lucca-api/employee-attributes is paginated. Use ?include=totalCount,links to get the total count and cursor links for navigating pages. The default and maximum page size is defined in the API Reference.
Pagination
Learn how cursor-based pagination works.
Filtering
Learn more about filtering collections.