Get employee schedule
curl --request GET \
--url http://localhost:3000/v1/auth/scheduleimport requests
url = "http://localhost:3000/v1/auth/schedule"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3000/v1/auth/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/auth/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3000/v1/auth/schedule"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/v1/auth/schedule")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v1/auth/schedule")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"shifts": [
{
"id": 123,
"employee_id": 123,
"date": "<string>",
"start_time": 123,
"end_time": 123,
"start_time_localized": "<string>",
"end_time_localized": "<string>",
"operational_unit": 123,
"operational_unit_name": "<string>",
"company_name": "<string>",
"location_label": "<string>",
"is_open": true,
"is_published": true,
"is_locked": true,
"comment": "<string>"
}
],
"deputy_employee_id": 123,
"deputy_configured": true,
"message": "<string>",
"staff_id": "<string>",
"error": "<string>",
"error_details": "<string>"
}Scheduling
Get employee schedule
Returns shifts for the next 7 days. Supports staff_id query param for PIN auth.
GET
/
v1
/
auth
/
schedule
Get employee schedule
curl --request GET \
--url http://localhost:3000/v1/auth/scheduleimport requests
url = "http://localhost:3000/v1/auth/schedule"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3000/v1/auth/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/auth/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3000/v1/auth/schedule"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/v1/auth/schedule")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v1/auth/schedule")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"shifts": [
{
"id": 123,
"employee_id": 123,
"date": "<string>",
"start_time": 123,
"end_time": 123,
"start_time_localized": "<string>",
"end_time_localized": "<string>",
"operational_unit": 123,
"operational_unit_name": "<string>",
"company_name": "<string>",
"location_label": "<string>",
"is_open": true,
"is_published": true,
"is_locked": true,
"comment": "<string>"
}
],
"deputy_employee_id": 123,
"deputy_configured": true,
"message": "<string>",
"staff_id": "<string>",
"error": "<string>",
"error_details": "<string>"
}Query Parameters
Staff ID for service accounts with PIN auth
Example:
"123e4567-e89b-12d3-a456-426614174000"
⌘I