cURL
curl --request PUT \
--url https://{tenant}.stamp.eu/rest/employees/{employee} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"email": "jsmith@example.com",
"password": "<string>",
"name": "<string>",
"surname": "<string>",
"birthday": "2023-11-07T05:31:56Z",
"working_hours": "<string>",
"vacation_days": 1,
"employed_start": "2023-11-07T05:31:56Z",
"employed_end": "2023-11-07T05:31:56Z",
"unit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"department_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": "<string>",
"active": true,
"role": "<string>",
"uses_projects": true,
"reference_no": "<string>",
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"include_in_export": true,
"time_account_enabled": true,
"weekly_hours_limit": "<string>",
"holiday_auto_compensation": true,
"private_email": "jsmith@example.com",
"phone": "<string>",
"emergency_contact_name": "<string>",
"emergency_contact_relation": "<string>",
"emergency_contact_phone": "<string>"
}
'import requests
url = "https://{tenant}.stamp.eu/rest/employees/{employee}"
payload = {
"code": "<string>",
"email": "jsmith@example.com",
"password": "<string>",
"name": "<string>",
"surname": "<string>",
"birthday": "2023-11-07T05:31:56Z",
"working_hours": "<string>",
"vacation_days": 1,
"employed_start": "2023-11-07T05:31:56Z",
"employed_end": "2023-11-07T05:31:56Z",
"unit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"department_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": "<string>",
"active": True,
"role": "<string>",
"uses_projects": True,
"reference_no": "<string>",
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"include_in_export": True,
"time_account_enabled": True,
"weekly_hours_limit": "<string>",
"holiday_auto_compensation": True,
"private_email": "jsmith@example.com",
"phone": "<string>",
"emergency_contact_name": "<string>",
"emergency_contact_relation": "<string>",
"emergency_contact_phone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
email: 'jsmith@example.com',
password: '<string>',
name: '<string>',
surname: '<string>',
birthday: '2023-11-07T05:31:56Z',
working_hours: '<string>',
vacation_days: 1,
employed_start: '2023-11-07T05:31:56Z',
employed_end: '2023-11-07T05:31:56Z',
unit_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
department_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
position: '<string>',
active: true,
role: '<string>',
uses_projects: true,
reference_no: '<string>',
salary_type_work: '<string>',
salary_type_overtime: '<string>',
include_in_export: true,
time_account_enabled: true,
weekly_hours_limit: '<string>',
holiday_auto_compensation: true,
private_email: 'jsmith@example.com',
phone: '<string>',
emergency_contact_name: '<string>',
emergency_contact_relation: '<string>',
emergency_contact_phone: '<string>'
})
};
fetch('https://{tenant}.stamp.eu/rest/employees/{employee}', 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://{tenant}.stamp.eu/rest/employees/{employee}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>',
'email' => 'jsmith@example.com',
'password' => '<string>',
'name' => '<string>',
'surname' => '<string>',
'birthday' => '2023-11-07T05:31:56Z',
'working_hours' => '<string>',
'vacation_days' => 1,
'employed_start' => '2023-11-07T05:31:56Z',
'employed_end' => '2023-11-07T05:31:56Z',
'unit_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'department_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position' => '<string>',
'active' => true,
'role' => '<string>',
'uses_projects' => true,
'reference_no' => '<string>',
'salary_type_work' => '<string>',
'salary_type_overtime' => '<string>',
'include_in_export' => true,
'time_account_enabled' => true,
'weekly_hours_limit' => '<string>',
'holiday_auto_compensation' => true,
'private_email' => 'jsmith@example.com',
'phone' => '<string>',
'emergency_contact_name' => '<string>',
'emergency_contact_relation' => '<string>',
'emergency_contact_phone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.stamp.eu/rest/employees/{employee}"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"working_hours\": \"<string>\",\n \"vacation_days\": 1,\n \"employed_start\": \"2023-11-07T05:31:56Z\",\n \"employed_end\": \"2023-11-07T05:31:56Z\",\n \"unit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": \"<string>\",\n \"active\": true,\n \"role\": \"<string>\",\n \"uses_projects\": true,\n \"reference_no\": \"<string>\",\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"include_in_export\": true,\n \"time_account_enabled\": true,\n \"weekly_hours_limit\": \"<string>\",\n \"holiday_auto_compensation\": true,\n \"private_email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"emergency_contact_name\": \"<string>\",\n \"emergency_contact_relation\": \"<string>\",\n \"emergency_contact_phone\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}.stamp.eu/rest/employees/{employee}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"working_hours\": \"<string>\",\n \"vacation_days\": 1,\n \"employed_start\": \"2023-11-07T05:31:56Z\",\n \"employed_end\": \"2023-11-07T05:31:56Z\",\n \"unit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": \"<string>\",\n \"active\": true,\n \"role\": \"<string>\",\n \"uses_projects\": true,\n \"reference_no\": \"<string>\",\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"include_in_export\": true,\n \"time_account_enabled\": true,\n \"weekly_hours_limit\": \"<string>\",\n \"holiday_auto_compensation\": true,\n \"private_email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"emergency_contact_name\": \"<string>\",\n \"emergency_contact_relation\": \"<string>\",\n \"emergency_contact_phone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/employees/{employee}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"working_hours\": \"<string>\",\n \"vacation_days\": 1,\n \"employed_start\": \"2023-11-07T05:31:56Z\",\n \"employed_end\": \"2023-11-07T05:31:56Z\",\n \"unit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": \"<string>\",\n \"active\": true,\n \"role\": \"<string>\",\n \"uses_projects\": true,\n \"reference_no\": \"<string>\",\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"include_in_export\": true,\n \"time_account_enabled\": true,\n \"weekly_hours_limit\": \"<string>\",\n \"holiday_auto_compensation\": true,\n \"private_email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"emergency_contact_name\": \"<string>\",\n \"emergency_contact_relation\": \"<string>\",\n \"emergency_contact_phone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"code": "<string>",
"name": "<string>",
"surname": "<string>",
"gender": "<string>",
"birthday": "<string>",
"working_hours": "<string>",
"vacation_days": 123,
"employed_start": "<string>",
"employed_end": "<string>",
"position": "<string>",
"avatar_url": "<string>",
"private_email": "<string>",
"phone": "<string>",
"emergency_contact_name": "<string>",
"emergency_contact_relation": "<string>",
"emergency_contact_phone": "<string>",
"active": "<string>",
"uses_projects": "<string>",
"reference_no": "<string>",
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"include_in_export": "<string>",
"time_account_enabled": "<string>",
"weekly_hours_limit": "<string>",
"holiday_auto_compensation": "<string>",
"latest_overtime_account": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>",
"unit": {
"id": "<string>",
"name": "<string>",
"parent_id": "<string>",
"permissions": {},
"created_at": "<string>",
"updated_at": "<string>",
"children": "<array>"
},
"location": {
"id": "<string>",
"name": "<string>",
"phone": "<string>",
"address": "<string>",
"address_additional": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state_region": "<string>",
"country": "<string>",
"timezone": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"holidays": [
{
"id": "<string>",
"name": "<string>",
"is_system": "<string>",
"source_key": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"entries": [
{
"id": "<string>",
"date": "<string>",
"name": "<string>",
"half_day": "<string>"
}
]
}
],
"employees_count": 123
},
"department": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"cost_center": {
"id": "<string>",
"code": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"email": "<string>",
"locale": "<string>",
"role": "<string>",
"role_display_name": "<string>",
"work_area_ids": [
"<unknown>"
],
"onboarding": {
"has_reference_no": true,
"has_email": true,
"has_schedule_model": true,
"has_holiday_calendar": true,
"has_payroll_data": true
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Mitarbeitende
Mitarbeitende aktualisieren
PUT
/
employees
/
{employee}
cURL
curl --request PUT \
--url https://{tenant}.stamp.eu/rest/employees/{employee} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"email": "jsmith@example.com",
"password": "<string>",
"name": "<string>",
"surname": "<string>",
"birthday": "2023-11-07T05:31:56Z",
"working_hours": "<string>",
"vacation_days": 1,
"employed_start": "2023-11-07T05:31:56Z",
"employed_end": "2023-11-07T05:31:56Z",
"unit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"department_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": "<string>",
"active": true,
"role": "<string>",
"uses_projects": true,
"reference_no": "<string>",
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"include_in_export": true,
"time_account_enabled": true,
"weekly_hours_limit": "<string>",
"holiday_auto_compensation": true,
"private_email": "jsmith@example.com",
"phone": "<string>",
"emergency_contact_name": "<string>",
"emergency_contact_relation": "<string>",
"emergency_contact_phone": "<string>"
}
'import requests
url = "https://{tenant}.stamp.eu/rest/employees/{employee}"
payload = {
"code": "<string>",
"email": "jsmith@example.com",
"password": "<string>",
"name": "<string>",
"surname": "<string>",
"birthday": "2023-11-07T05:31:56Z",
"working_hours": "<string>",
"vacation_days": 1,
"employed_start": "2023-11-07T05:31:56Z",
"employed_end": "2023-11-07T05:31:56Z",
"unit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"department_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": "<string>",
"active": True,
"role": "<string>",
"uses_projects": True,
"reference_no": "<string>",
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"include_in_export": True,
"time_account_enabled": True,
"weekly_hours_limit": "<string>",
"holiday_auto_compensation": True,
"private_email": "jsmith@example.com",
"phone": "<string>",
"emergency_contact_name": "<string>",
"emergency_contact_relation": "<string>",
"emergency_contact_phone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
email: 'jsmith@example.com',
password: '<string>',
name: '<string>',
surname: '<string>',
birthday: '2023-11-07T05:31:56Z',
working_hours: '<string>',
vacation_days: 1,
employed_start: '2023-11-07T05:31:56Z',
employed_end: '2023-11-07T05:31:56Z',
unit_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
department_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
position: '<string>',
active: true,
role: '<string>',
uses_projects: true,
reference_no: '<string>',
salary_type_work: '<string>',
salary_type_overtime: '<string>',
include_in_export: true,
time_account_enabled: true,
weekly_hours_limit: '<string>',
holiday_auto_compensation: true,
private_email: 'jsmith@example.com',
phone: '<string>',
emergency_contact_name: '<string>',
emergency_contact_relation: '<string>',
emergency_contact_phone: '<string>'
})
};
fetch('https://{tenant}.stamp.eu/rest/employees/{employee}', 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://{tenant}.stamp.eu/rest/employees/{employee}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>',
'email' => 'jsmith@example.com',
'password' => '<string>',
'name' => '<string>',
'surname' => '<string>',
'birthday' => '2023-11-07T05:31:56Z',
'working_hours' => '<string>',
'vacation_days' => 1,
'employed_start' => '2023-11-07T05:31:56Z',
'employed_end' => '2023-11-07T05:31:56Z',
'unit_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'department_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position' => '<string>',
'active' => true,
'role' => '<string>',
'uses_projects' => true,
'reference_no' => '<string>',
'salary_type_work' => '<string>',
'salary_type_overtime' => '<string>',
'include_in_export' => true,
'time_account_enabled' => true,
'weekly_hours_limit' => '<string>',
'holiday_auto_compensation' => true,
'private_email' => 'jsmith@example.com',
'phone' => '<string>',
'emergency_contact_name' => '<string>',
'emergency_contact_relation' => '<string>',
'emergency_contact_phone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.stamp.eu/rest/employees/{employee}"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"working_hours\": \"<string>\",\n \"vacation_days\": 1,\n \"employed_start\": \"2023-11-07T05:31:56Z\",\n \"employed_end\": \"2023-11-07T05:31:56Z\",\n \"unit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": \"<string>\",\n \"active\": true,\n \"role\": \"<string>\",\n \"uses_projects\": true,\n \"reference_no\": \"<string>\",\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"include_in_export\": true,\n \"time_account_enabled\": true,\n \"weekly_hours_limit\": \"<string>\",\n \"holiday_auto_compensation\": true,\n \"private_email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"emergency_contact_name\": \"<string>\",\n \"emergency_contact_relation\": \"<string>\",\n \"emergency_contact_phone\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}.stamp.eu/rest/employees/{employee}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"working_hours\": \"<string>\",\n \"vacation_days\": 1,\n \"employed_start\": \"2023-11-07T05:31:56Z\",\n \"employed_end\": \"2023-11-07T05:31:56Z\",\n \"unit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": \"<string>\",\n \"active\": true,\n \"role\": \"<string>\",\n \"uses_projects\": true,\n \"reference_no\": \"<string>\",\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"include_in_export\": true,\n \"time_account_enabled\": true,\n \"weekly_hours_limit\": \"<string>\",\n \"holiday_auto_compensation\": true,\n \"private_email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"emergency_contact_name\": \"<string>\",\n \"emergency_contact_relation\": \"<string>\",\n \"emergency_contact_phone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/employees/{employee}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"working_hours\": \"<string>\",\n \"vacation_days\": 1,\n \"employed_start\": \"2023-11-07T05:31:56Z\",\n \"employed_end\": \"2023-11-07T05:31:56Z\",\n \"unit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position\": \"<string>\",\n \"active\": true,\n \"role\": \"<string>\",\n \"uses_projects\": true,\n \"reference_no\": \"<string>\",\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"include_in_export\": true,\n \"time_account_enabled\": true,\n \"weekly_hours_limit\": \"<string>\",\n \"holiday_auto_compensation\": true,\n \"private_email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"emergency_contact_name\": \"<string>\",\n \"emergency_contact_relation\": \"<string>\",\n \"emergency_contact_phone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"code": "<string>",
"name": "<string>",
"surname": "<string>",
"gender": "<string>",
"birthday": "<string>",
"working_hours": "<string>",
"vacation_days": 123,
"employed_start": "<string>",
"employed_end": "<string>",
"position": "<string>",
"avatar_url": "<string>",
"private_email": "<string>",
"phone": "<string>",
"emergency_contact_name": "<string>",
"emergency_contact_relation": "<string>",
"emergency_contact_phone": "<string>",
"active": "<string>",
"uses_projects": "<string>",
"reference_no": "<string>",
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"include_in_export": "<string>",
"time_account_enabled": "<string>",
"weekly_hours_limit": "<string>",
"holiday_auto_compensation": "<string>",
"latest_overtime_account": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>",
"unit": {
"id": "<string>",
"name": "<string>",
"parent_id": "<string>",
"permissions": {},
"created_at": "<string>",
"updated_at": "<string>",
"children": "<array>"
},
"location": {
"id": "<string>",
"name": "<string>",
"phone": "<string>",
"address": "<string>",
"address_additional": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state_region": "<string>",
"country": "<string>",
"timezone": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"holidays": [
{
"id": "<string>",
"name": "<string>",
"is_system": "<string>",
"source_key": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"entries": [
{
"id": "<string>",
"date": "<string>",
"name": "<string>",
"half_day": "<string>"
}
]
}
],
"employees_count": 123
},
"department": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"cost_center": {
"id": "<string>",
"code": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"email": "<string>",
"locale": "<string>",
"role": "<string>",
"role_display_name": "<string>",
"work_area_ids": [
"<unknown>"
],
"onboarding": {
"has_reference_no": true,
"has_email": true,
"has_schedule_model": true,
"has_holiday_calendar": true,
"has_payroll_data": true
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
Path Parameters
The employee ID
Body
application/json
Maximum string length:
50Maximum string length:
255Minimum string length:
8Maximum string length:
255Maximum string length:
255Available options:
male, female, diverse, not_specified Pattern:
^\d{2}:\d{2}:\d{2}\.\d{3}$Required range:
x >= 0Maximum string length:
255Maximum string length:
50Maximum string length:
100Maximum string length:
100Maximum string length:
255Maximum string length:
32Maximum string length:
255Maximum string length:
255Maximum string length:
32Supported UI / notification languages. Drives the per-user locale column, the app/web UI language after login, and server-rendered mail/push/inbox text.
Available options:
de, en, tr, fr, es, it, ch, nl Response
EmployeeResource
Show child attributes
Show child attributes
⌘I