Get a User by Id
curl --request GET \
--url https://{host}/api/v3/users/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://{host}/api/v3/users/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://{host}/api/v3/users/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/v3/users/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/v3/users/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/v3/users/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/v3/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 416,
"name": "John Doe",
"url": "http://example.ilucca.net/api/users/1",
"displayName": "Doe John",
"modifiedAt": "2015-09-07T10:20:06.583",
"lastName": "DOE",
"firstName": "John",
"login": "jdoe",
"mail": "no-reply@lucca.fr",
"dtContractStart": "2014-09-01T00:00:00",
"dtContractEnd": null,
"birthDate": "1989-12-22T00:00:00",
"employeeNumber": "00057",
"calendarId": 1,
"calendar": {
"id": 1,
"url": "http://example.ilucca.net/api/v3/publicHolidayCalendars/1",
"name": "Jours fériés en France"
},
"cultureID": 1036,
"picture": {
"id": "74d381db-dd4d-4f64-bc1e-582d806e58a8",
"href": "http://example.ilucca.net/api/v3/files/74d381db-dd4d-4f64-bc1e-582d806e58a8"
},
"legalEntityId": 1,
"legalEntity": {
"id": 1,
"name": "Lucca",
"url": "http://example.ilucca.net/api/v3/legalEntities/1"
},
"departmentId": 13,
"department": {
"id": 13,
"name": "BU Timmi/Lucca",
"url": "http://example.ilucca.net/api/v3/departments/13"
},
"managerId": 383,
"manager": {
"id": 383,
"firstName": "Roger",
"lastName": "Smith",
"url": "http://example.ilucca.net/api/v3/users/383"
},
"rolePrincipalId": 55,
"rolePrincipal": {
"id": 55,
"name": "User",
"url": "http://example.ilucca.net/api/v3/roles/55"
},
"habilitedRoles": [
{
"id": 59,
"name": "Employee +",
"url": "http://example.ilucca.net/api/v3/roles/59"
},
{
"id": 63,
"name": "Analytics access",
"url": "http://example.ilucca.net/api/roles/63"
}
],
"userWorkCycles": [
{
"id": 288,
"ownerID": 416,
"workCycleID": 6,
"startsOn": "1900-01-01T00:00:00",
"endsOn": "2015-03-09T00:00:00"
},
{
"id": 289,
"ownerID": 416,
"workCycleID": 9,
"startsOn": "2015-03-10T00:00:00",
"endsOn": "2015-10-13T00:00:00"
},
{
"id": 317,
"ownerID": 416,
"workCycleID": 14,
"startsOn": "2015-10-13T00:00:00",
"endsOn": "9999-12-31T00:00:00"
}
],
"extendedData": {
"e_bloodType": {
"value": "AB"
}
},
"applicationData": {
"profile_figgo": {
"id": 1,
"name": "Cadre (218 jours)",
"url": "https://ample.ilucca.net/api/v3/leaveprofiles/1"
}
},
"userAxisValues_2": {
"id": 35,
"name": "R&D",
"url": "https://example.ilucca.net/api/v3/axissections/35",
"axisId": 2
},
"allowsElectronicPayslip": true,
"bankName": "Banque Postale",
"rib": null,
"iban": "FR0312739000302346383836C42",
"bic": "PSSTFRPPXXX",
"frenchCarTaxHorsePower": 5,
"frenchMotocyclesTaxHorsePower": null,
"unitSellPrice": null
}
}Employees Directory
Get a User by Id
Retrieve a single User identified by its unique identifier.
GET
/
api
/
v3
/
users
/
{id}
Get a User by Id
curl --request GET \
--url https://{host}/api/v3/users/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://{host}/api/v3/users/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://{host}/api/v3/users/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/v3/users/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/v3/users/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/v3/users/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/v3/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 416,
"name": "John Doe",
"url": "http://example.ilucca.net/api/users/1",
"displayName": "Doe John",
"modifiedAt": "2015-09-07T10:20:06.583",
"lastName": "DOE",
"firstName": "John",
"login": "jdoe",
"mail": "no-reply@lucca.fr",
"dtContractStart": "2014-09-01T00:00:00",
"dtContractEnd": null,
"birthDate": "1989-12-22T00:00:00",
"employeeNumber": "00057",
"calendarId": 1,
"calendar": {
"id": 1,
"url": "http://example.ilucca.net/api/v3/publicHolidayCalendars/1",
"name": "Jours fériés en France"
},
"cultureID": 1036,
"picture": {
"id": "74d381db-dd4d-4f64-bc1e-582d806e58a8",
"href": "http://example.ilucca.net/api/v3/files/74d381db-dd4d-4f64-bc1e-582d806e58a8"
},
"legalEntityId": 1,
"legalEntity": {
"id": 1,
"name": "Lucca",
"url": "http://example.ilucca.net/api/v3/legalEntities/1"
},
"departmentId": 13,
"department": {
"id": 13,
"name": "BU Timmi/Lucca",
"url": "http://example.ilucca.net/api/v3/departments/13"
},
"managerId": 383,
"manager": {
"id": 383,
"firstName": "Roger",
"lastName": "Smith",
"url": "http://example.ilucca.net/api/v3/users/383"
},
"rolePrincipalId": 55,
"rolePrincipal": {
"id": 55,
"name": "User",
"url": "http://example.ilucca.net/api/v3/roles/55"
},
"habilitedRoles": [
{
"id": 59,
"name": "Employee +",
"url": "http://example.ilucca.net/api/v3/roles/59"
},
{
"id": 63,
"name": "Analytics access",
"url": "http://example.ilucca.net/api/roles/63"
}
],
"userWorkCycles": [
{
"id": 288,
"ownerID": 416,
"workCycleID": 6,
"startsOn": "1900-01-01T00:00:00",
"endsOn": "2015-03-09T00:00:00"
},
{
"id": 289,
"ownerID": 416,
"workCycleID": 9,
"startsOn": "2015-03-10T00:00:00",
"endsOn": "2015-10-13T00:00:00"
},
{
"id": 317,
"ownerID": 416,
"workCycleID": 14,
"startsOn": "2015-10-13T00:00:00",
"endsOn": "9999-12-31T00:00:00"
}
],
"extendedData": {
"e_bloodType": {
"value": "AB"
}
},
"applicationData": {
"profile_figgo": {
"id": 1,
"name": "Cadre (218 jours)",
"url": "https://ample.ilucca.net/api/v3/leaveprofiles/1"
}
},
"userAxisValues_2": {
"id": 35,
"name": "R&D",
"url": "https://example.ilucca.net/api/v3/axissections/35",
"axisId": 2
},
"allowsElectronicPayslip": true,
"bankName": "Banque Postale",
"rib": null,
"iban": "FR0312739000302346383836C42",
"bic": "PSSTFRPPXXX",
"frenchCarTaxHorsePower": 5,
"frenchMotocyclesTaxHorsePower": null,
"unitSellPrice": null
}
}This legacy endpoint has its equivalent in the Lucca API (currently in beta):
GET /lucca-api/employees/{id}.To retrieve all data for a given employee (including extensions) in a single call, you may also use GET /lucca-api/employee-attributes with the employee.id filter.Headers
API key. Value must be formatted like so: lucca application={api_key}.
Path Parameters
ID of the user.
Query Parameters
Comma-separated list of fields of the user to include in responses. Extended data can be retrieved with ?fields=extendedData.
Response
OK
Show child attributes
Show child attributes
Example:
{
"id": 416,
"name": "John Doe",
"url": "http://example.ilucca.net/api/users/1",
"displayName": "Doe John",
"modifiedAt": "2015-09-07T10:20:06.583",
"lastName": "DOE",
"firstName": "John",
"login": "jdoe",
"mail": "no-reply@lucca.fr",
"dtContractStart": "2014-09-01T00:00:00",
"dtContractEnd": null,
"birthDate": "1989-12-22T00:00:00",
"employeeNumber": "00057",
"calendarId": 1,
"calendar": {
"id": 1,
"url": "http://example.ilucca.net/api/v3/publicHolidayCalendars/1",
"name": "Jours fériés en France"
},
"cultureID": 1036,
"culture": {
"id": 1036,
"name": "français (France)",
"url": "http://example.ilucca.net/api/v3/cultures/1036"
},
"picture": {
"id": "74d381db-dd4d-4f64-bc1e-582d806e58a8",
"url": "http://example.ilucca.net/api/v3/files/74d381db-dd4d-4f64-bc1e-582d806e58a8",
"name": "jdoe.png"
},
"legalEntityId": 1,
"legalEntity": {
"id": 1,
"name": "Lucca",
"url": "http://example.ilucca.net/api/v3/legalEntities/1"
},
"departmentId": 13,
"department": {
"id": 13,
"name": "BU Timmi/Lucca",
"url": "http://example.ilucca.net/api/v3/departments/13"
},
"managerId": 383,
"manager": {
"id": 383,
"name": "Roger Smith",
"url": "http://example.ilucca.net/api/v3/users/383"
},
"rolePrincipalId": 55,
"rolePrincipal": {
"id": 55,
"name": "User",
"url": "http://example.ilucca.net/api/v3/roles/55"
},
"habilitedRoles": [
{
"id": 59,
"name": "Employee +",
"url": "http://example.ilucca.net/api/v3/roles/59"
},
{
"id": 63,
"name": "Analytics access",
"url": "http://example.ilucca.net/api/roles/63"
}
],
"userWorkCycles": [
{
"id": 288,
"ownerID": 416,
"workCycleID": 6,
"startsOn": "1900-01-01T00:00:00",
"endsOn": "2015-03-09T00:00:00"
},
{
"id": 289,
"ownerID": 416,
"workCycleID": 9,
"startsOn": "2015-03-10T00:00:00",
"endsOn": "2015-10-13T00:00:00"
},
{
"id": 317,
"ownerID": 416,
"workCycleID": 14,
"startsOn": "2015-10-13T00:00:00",
"endsOn": "9999-12-31T00:00:00"
}
],
"allowsElectronicPayslip": true,
"userAxisValues_2": { "id": 35 }
}
Related topics
Users ExamplesGet specific userLocationGet Departement by id (v3)Get import user locations progressGet a leave by idWas this page helpful?
⌘I