Update an entry, optionally across its series (scope) and optionally
publishing it in the same step
curl --request PUT \
--url https://{tenant}.stamp.eu/rest/roster_entries/{rosterEntry} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-11-07T05:31:56Z",
"shift_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_time": "<string>",
"end_time": "<string>",
"note": "<string>",
"work_area_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publish": true,
"force": true
}
'import requests
url = "https://{tenant}.stamp.eu/rest/roster_entries/{rosterEntry}"
payload = {
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-11-07T05:31:56Z",
"shift_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_time": "<string>",
"end_time": "<string>",
"note": "<string>",
"work_area_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publish": True,
"force": True
}
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({
employee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
date: '2023-11-07T05:31:56Z',
shift_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
start_time: '<string>',
end_time: '<string>',
note: '<string>',
work_area_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
publish: true,
force: true
})
};
fetch('https://{tenant}.stamp.eu/rest/roster_entries/{rosterEntry}', 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/roster_entries/{rosterEntry}",
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([
'employee_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'date' => '2023-11-07T05:31:56Z',
'shift_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_time' => '<string>',
'end_time' => '<string>',
'note' => '<string>',
'work_area_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'publish' => true,
'force' => true
]),
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/roster_entries/{rosterEntry}"
payload := strings.NewReader("{\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"note\": \"<string>\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": true,\n \"force\": true\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/roster_entries/{rosterEntry}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"note\": \"<string>\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": true,\n \"force\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/roster_entries/{rosterEntry}")
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 \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"note\": \"<string>\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": true,\n \"force\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"roster_id": "<string>",
"employee_id": "<string>",
"date": "<string>",
"shift_id": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"effective_start": "<string>",
"effective_end": "<string>",
"planned_work": "<string>",
"note": "<string>",
"work_area_id": "<string>",
"effective_work_area_id": "<string>",
"status": "<string>",
"generated": true,
"series_id": "<string>",
"source_unit_id": "<string>",
"source_unit": {
"id": "<string>",
"name": "<string>"
},
"is_cross_unit": true,
"published_at": "<string>",
"is_open": true,
"applications_count": 123,
"warnings": [
"<string>"
],
"employee_name": "<string>",
"shift": {
"id": "<string>",
"name": "<string>",
"abbreviation": "<string>",
"color": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"break_duration": "<string>",
"is_overnight": "<string>",
"schedule_model_id": "<string>",
"work_area_id": "<string>",
"tags": "<string>",
"note": "<string>",
"fairness_weight": 123,
"net_duration_ms": 123
},
"acknowledgement": {
"pending": 1,
"acknowledged": 1,
"acknowledged_at": "<string>"
},
"my_application": "<unknown>"
},
"affected_count": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Dienstplan-Einträge
Eintrag aktualisieren
PUT
/
roster_entries
/
{rosterEntry}
Update an entry, optionally across its series (scope) and optionally
publishing it in the same step
curl --request PUT \
--url https://{tenant}.stamp.eu/rest/roster_entries/{rosterEntry} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-11-07T05:31:56Z",
"shift_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_time": "<string>",
"end_time": "<string>",
"note": "<string>",
"work_area_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publish": true,
"force": true
}
'import requests
url = "https://{tenant}.stamp.eu/rest/roster_entries/{rosterEntry}"
payload = {
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-11-07T05:31:56Z",
"shift_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_time": "<string>",
"end_time": "<string>",
"note": "<string>",
"work_area_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publish": True,
"force": True
}
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({
employee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
date: '2023-11-07T05:31:56Z',
shift_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
start_time: '<string>',
end_time: '<string>',
note: '<string>',
work_area_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
publish: true,
force: true
})
};
fetch('https://{tenant}.stamp.eu/rest/roster_entries/{rosterEntry}', 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/roster_entries/{rosterEntry}",
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([
'employee_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'date' => '2023-11-07T05:31:56Z',
'shift_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_time' => '<string>',
'end_time' => '<string>',
'note' => '<string>',
'work_area_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'publish' => true,
'force' => true
]),
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/roster_entries/{rosterEntry}"
payload := strings.NewReader("{\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"note\": \"<string>\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": true,\n \"force\": true\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/roster_entries/{rosterEntry}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"note\": \"<string>\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": true,\n \"force\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/roster_entries/{rosterEntry}")
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 \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"note\": \"<string>\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": true,\n \"force\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"roster_id": "<string>",
"employee_id": "<string>",
"date": "<string>",
"shift_id": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"effective_start": "<string>",
"effective_end": "<string>",
"planned_work": "<string>",
"note": "<string>",
"work_area_id": "<string>",
"effective_work_area_id": "<string>",
"status": "<string>",
"generated": true,
"series_id": "<string>",
"source_unit_id": "<string>",
"source_unit": {
"id": "<string>",
"name": "<string>"
},
"is_cross_unit": true,
"published_at": "<string>",
"is_open": true,
"applications_count": 123,
"warnings": [
"<string>"
],
"employee_name": "<string>",
"shift": {
"id": "<string>",
"name": "<string>",
"abbreviation": "<string>",
"color": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"break_duration": "<string>",
"is_overnight": "<string>",
"schedule_model_id": "<string>",
"work_area_id": "<string>",
"tags": "<string>",
"note": "<string>",
"fairness_weight": 123,
"net_duration_ms": 123
},
"acknowledgement": {
"pending": 1,
"acknowledged": 1,
"acknowledged_at": "<string>"
},
"my_application": "<unknown>"
},
"affected_count": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
Path Parameters
The roster entry ID
Body
application/json
Available options:
0, 1, 2, 3 Available options:
only_this, this_and_following, all ⌘I