cURL
curl --request POST \
--url https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shift_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"weekday": 4,
"min_count": 1,
"optimal_count": 1,
"skill_requirements": [
{
"skill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required_count": 2,
"min_level": 2
}
]
}
'import requests
url = "https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements"
payload = {
"shift_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"weekday": 4,
"min_count": 1,
"optimal_count": 1,
"skill_requirements": [
{
"skill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required_count": 2,
"min_level": 2
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shift_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
weekday: 4,
min_count: 1,
optimal_count: 1,
skill_requirements: [
{
skill_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
required_count: 2,
min_level: 2
}
]
})
};
fetch('https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements', 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/units/{unit}/shift_requirements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shift_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'weekday' => 4,
'min_count' => 1,
'optimal_count' => 1,
'skill_requirements' => [
[
'skill_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'required_count' => 2,
'min_level' => 2
]
]
]),
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/units/{unit}/shift_requirements"
payload := strings.NewReader("{\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"weekday\": 4,\n \"min_count\": 1,\n \"optimal_count\": 1,\n \"skill_requirements\": [\n {\n \"skill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required_count\": 2,\n \"min_level\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"weekday\": 4,\n \"min_count\": 1,\n \"optimal_count\": 1,\n \"skill_requirements\": [\n {\n \"skill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required_count\": 2,\n \"min_level\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"weekday\": 4,\n \"min_count\": 1,\n \"optimal_count\": 1,\n \"skill_requirements\": [\n {\n \"skill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required_count\": 2,\n \"min_level\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"unit_id": "<string>",
"shift_id": "<string>",
"weekday": "<string>",
"min_count": "<string>",
"optimal_count": "<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
},
"skills": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Schichten & Bedarfe
Besetzungsbedarf anlegen
POST
/
units
/
{unit}
/
shift_requirements
cURL
curl --request POST \
--url https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shift_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"weekday": 4,
"min_count": 1,
"optimal_count": 1,
"skill_requirements": [
{
"skill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required_count": 2,
"min_level": 2
}
]
}
'import requests
url = "https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements"
payload = {
"shift_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"weekday": 4,
"min_count": 1,
"optimal_count": 1,
"skill_requirements": [
{
"skill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required_count": 2,
"min_level": 2
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shift_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
weekday: 4,
min_count: 1,
optimal_count: 1,
skill_requirements: [
{
skill_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
required_count: 2,
min_level: 2
}
]
})
};
fetch('https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements', 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/units/{unit}/shift_requirements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shift_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'weekday' => 4,
'min_count' => 1,
'optimal_count' => 1,
'skill_requirements' => [
[
'skill_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'required_count' => 2,
'min_level' => 2
]
]
]),
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/units/{unit}/shift_requirements"
payload := strings.NewReader("{\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"weekday\": 4,\n \"min_count\": 1,\n \"optimal_count\": 1,\n \"skill_requirements\": [\n {\n \"skill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required_count\": 2,\n \"min_level\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"weekday\": 4,\n \"min_count\": 1,\n \"optimal_count\": 1,\n \"skill_requirements\": [\n {\n \"skill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required_count\": 2,\n \"min_level\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/units/{unit}/shift_requirements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shift_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"weekday\": 4,\n \"min_count\": 1,\n \"optimal_count\": 1,\n \"skill_requirements\": [\n {\n \"skill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required_count\": 2,\n \"min_level\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"unit_id": "<string>",
"shift_id": "<string>",
"weekday": "<string>",
"min_count": "<string>",
"optimal_count": "<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
},
"skills": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
Path Parameters
The unit ID
Body
application/json
Response
ShiftRequirementResource
Show child attributes
Show child attributes
⌘I