PATCH /rest/employees/bulk — Mass update a safe subset of employee fields
curl --request PATCH \
--url https://{tenant}.stamp.eu/rest/employees/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"fields": {
"unit_id": 123,
"department_id": 123,
"cost_center_id": 123,
"location_id": 123,
"active": true,
"include_in_export": true,
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"vacation_days": 182.5
}
}
'import requests
url = "https://{tenant}.stamp.eu/rest/employees/bulk"
payload = {
"employee_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"fields": {
"unit_id": 123,
"department_id": 123,
"cost_center_id": 123,
"location_id": 123,
"active": True,
"include_in_export": True,
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"vacation_days": 182.5
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
employee_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
fields: {
unit_id: 123,
department_id: 123,
cost_center_id: 123,
location_id: 123,
active: true,
include_in_export: true,
salary_type_work: '<string>',
salary_type_overtime: '<string>',
vacation_days: 182.5
}
})
};
fetch('https://{tenant}.stamp.eu/rest/employees/bulk', 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/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'employee_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'fields' => [
'unit_id' => 123,
'department_id' => 123,
'cost_center_id' => 123,
'location_id' => 123,
'active' => true,
'include_in_export' => true,
'salary_type_work' => '<string>',
'salary_type_overtime' => '<string>',
'vacation_days' => 182.5
]
]),
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/bulk"
payload := strings.NewReader("{\n \"employee_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fields\": {\n \"unit_id\": 123,\n \"department_id\": 123,\n \"cost_center_id\": 123,\n \"location_id\": 123,\n \"active\": true,\n \"include_in_export\": true,\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"vacation_days\": 182.5\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{tenant}.stamp.eu/rest/employees/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employee_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fields\": {\n \"unit_id\": 123,\n \"department_id\": 123,\n \"cost_center_id\": 123,\n \"location_id\": 123,\n \"active\": true,\n \"include_in_export\": true,\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"vacation_days\": 182.5\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/employees/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"employee_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fields\": {\n \"unit_id\": 123,\n \"department_id\": 123,\n \"cost_center_id\": 123,\n \"location_id\": 123,\n \"active\": true,\n \"include_in_export\": true,\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"vacation_days\": 182.5\n }\n}"
response = http.request(request)
puts response.read_body{
"updated": 123,
"skipped": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Mitarbeitende
Mitarbeitende im Stapel aktualisieren
Only fields present in the request are applied; all selected employees receive the same values (e.g. unit move, export flag, salary types).
PATCH
/
employees
/
bulk
PATCH /rest/employees/bulk — Mass update a safe subset of employee fields
curl --request PATCH \
--url https://{tenant}.stamp.eu/rest/employees/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"fields": {
"unit_id": 123,
"department_id": 123,
"cost_center_id": 123,
"location_id": 123,
"active": true,
"include_in_export": true,
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"vacation_days": 182.5
}
}
'import requests
url = "https://{tenant}.stamp.eu/rest/employees/bulk"
payload = {
"employee_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"fields": {
"unit_id": 123,
"department_id": 123,
"cost_center_id": 123,
"location_id": 123,
"active": True,
"include_in_export": True,
"salary_type_work": "<string>",
"salary_type_overtime": "<string>",
"vacation_days": 182.5
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
employee_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
fields: {
unit_id: 123,
department_id: 123,
cost_center_id: 123,
location_id: 123,
active: true,
include_in_export: true,
salary_type_work: '<string>',
salary_type_overtime: '<string>',
vacation_days: 182.5
}
})
};
fetch('https://{tenant}.stamp.eu/rest/employees/bulk', 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/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'employee_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'fields' => [
'unit_id' => 123,
'department_id' => 123,
'cost_center_id' => 123,
'location_id' => 123,
'active' => true,
'include_in_export' => true,
'salary_type_work' => '<string>',
'salary_type_overtime' => '<string>',
'vacation_days' => 182.5
]
]),
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/bulk"
payload := strings.NewReader("{\n \"employee_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fields\": {\n \"unit_id\": 123,\n \"department_id\": 123,\n \"cost_center_id\": 123,\n \"location_id\": 123,\n \"active\": true,\n \"include_in_export\": true,\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"vacation_days\": 182.5\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{tenant}.stamp.eu/rest/employees/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employee_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fields\": {\n \"unit_id\": 123,\n \"department_id\": 123,\n \"cost_center_id\": 123,\n \"location_id\": 123,\n \"active\": true,\n \"include_in_export\": true,\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"vacation_days\": 182.5\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/employees/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"employee_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fields\": {\n \"unit_id\": 123,\n \"department_id\": 123,\n \"cost_center_id\": 123,\n \"location_id\": 123,\n \"active\": true,\n \"include_in_export\": true,\n \"salary_type_work\": \"<string>\",\n \"salary_type_overtime\": \"<string>\",\n \"vacation_days\": 182.5\n }\n}"
response = http.request(request)
puts response.read_body{
"updated": 123,
"skipped": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
Body
application/json
⌘I