cURL
curl --request PUT \
--url https://{tenant}.stamp.eu/rest/shifts/{shift} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"abbreviation": "<string>",
"color": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"break_duration": "<string>",
"is_overnight": true,
"schedule_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_area_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>",
"fairness_weight": 3,
"tags": [
"<string>"
]
}
'import requests
url = "https://{tenant}.stamp.eu/rest/shifts/{shift}"
payload = {
"name": "<string>",
"abbreviation": "<string>",
"color": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"break_duration": "<string>",
"is_overnight": True,
"schedule_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_area_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>",
"fairness_weight": 3,
"tags": ["<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({
name: '<string>',
abbreviation: '<string>',
color: '<string>',
start_time: '<string>',
end_time: '<string>',
break_duration: '<string>',
is_overnight: true,
schedule_model_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
work_area_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
note: '<string>',
fairness_weight: 3,
tags: ['<string>']
})
};
fetch('https://{tenant}.stamp.eu/rest/shifts/{shift}', 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/shifts/{shift}",
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([
'name' => '<string>',
'abbreviation' => '<string>',
'color' => '<string>',
'start_time' => '<string>',
'end_time' => '<string>',
'break_duration' => '<string>',
'is_overnight' => true,
'schedule_model_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'work_area_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'note' => '<string>',
'fairness_weight' => 3,
'tags' => [
'<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/shifts/{shift}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"abbreviation\": \"<string>\",\n \"color\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"break_duration\": \"<string>\",\n \"is_overnight\": true,\n \"schedule_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\",\n \"fairness_weight\": 3,\n \"tags\": [\n \"<string>\"\n ]\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/shifts/{shift}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"abbreviation\": \"<string>\",\n \"color\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"break_duration\": \"<string>\",\n \"is_overnight\": true,\n \"schedule_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\",\n \"fairness_weight\": 3,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/shifts/{shift}")
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 \"name\": \"<string>\",\n \"abbreviation\": \"<string>\",\n \"color\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"break_duration\": \"<string>\",\n \"is_overnight\": true,\n \"schedule_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\",\n \"fairness_weight\": 3,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"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
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Schichten & Bedarfe
Schicht aktualisieren
PUT
/
shifts
/
{shift}
cURL
curl --request PUT \
--url https://{tenant}.stamp.eu/rest/shifts/{shift} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"abbreviation": "<string>",
"color": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"break_duration": "<string>",
"is_overnight": true,
"schedule_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_area_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>",
"fairness_weight": 3,
"tags": [
"<string>"
]
}
'import requests
url = "https://{tenant}.stamp.eu/rest/shifts/{shift}"
payload = {
"name": "<string>",
"abbreviation": "<string>",
"color": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"break_duration": "<string>",
"is_overnight": True,
"schedule_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_area_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>",
"fairness_weight": 3,
"tags": ["<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({
name: '<string>',
abbreviation: '<string>',
color: '<string>',
start_time: '<string>',
end_time: '<string>',
break_duration: '<string>',
is_overnight: true,
schedule_model_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
work_area_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
note: '<string>',
fairness_weight: 3,
tags: ['<string>']
})
};
fetch('https://{tenant}.stamp.eu/rest/shifts/{shift}', 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/shifts/{shift}",
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([
'name' => '<string>',
'abbreviation' => '<string>',
'color' => '<string>',
'start_time' => '<string>',
'end_time' => '<string>',
'break_duration' => '<string>',
'is_overnight' => true,
'schedule_model_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'work_area_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'note' => '<string>',
'fairness_weight' => 3,
'tags' => [
'<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/shifts/{shift}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"abbreviation\": \"<string>\",\n \"color\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"break_duration\": \"<string>\",\n \"is_overnight\": true,\n \"schedule_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\",\n \"fairness_weight\": 3,\n \"tags\": [\n \"<string>\"\n ]\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/shifts/{shift}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"abbreviation\": \"<string>\",\n \"color\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"break_duration\": \"<string>\",\n \"is_overnight\": true,\n \"schedule_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\",\n \"fairness_weight\": 3,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/shifts/{shift}")
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 \"name\": \"<string>\",\n \"abbreviation\": \"<string>\",\n \"color\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"break_duration\": \"<string>\",\n \"is_overnight\": true,\n \"schedule_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"work_area_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\",\n \"fairness_weight\": 3,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"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
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
Path Parameters
The shift ID
Body
application/json
Maximum string length:
255Maximum string length:
8Pattern:
^#[0-9A-Fa-f]{6}$Maximum string length:
2000Required range:
1 <= x <= 5Maximum array length:
10Maximum string length:
50Response
ShiftResource
Show child attributes
Show child attributes
⌘I