cURL
curl --request POST \
--url https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve', 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/shift_swaps/{shiftSwap}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/shift_swaps/{shiftSwap}/approve")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"requester_entry_id": "<string>",
"target_employee_id": "<string>",
"target_entry_id": "<string>",
"status": "<string>",
"manager_id": "<string>",
"auto_approved": true,
"resolution": "<string>",
"note": "<string>",
"created_at": "<string>",
"preview_warnings": [
{
"code": "<string>",
"severity": "<string>",
"message": "<string>"
}
],
"requester_entry": {
"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>"
},
"requester_employee": "<string>",
"target_employee": "<string>",
"target_entry": {
"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>"
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}Schichttausch
Tausch genehmigen
POST
/
shift_swaps
/
{shiftSwap}
/
approve
cURL
curl --request POST \
--url https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve', 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/shift_swaps/{shiftSwap}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/shift_swaps/{shiftSwap}/approve")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/shift_swaps/{shiftSwap}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"requester_entry_id": "<string>",
"target_employee_id": "<string>",
"target_entry_id": "<string>",
"status": "<string>",
"manager_id": "<string>",
"auto_approved": true,
"resolution": "<string>",
"note": "<string>",
"created_at": "<string>",
"preview_warnings": [
{
"code": "<string>",
"severity": "<string>",
"message": "<string>"
}
],
"requester_entry": {
"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>"
},
"requester_employee": "<string>",
"target_employee": "<string>",
"target_entry": {
"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>"
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}⌘I