POST /rest/mobile — Mobile clock-in/out (authenticated)
curl --request POST \
--url https://{tenant}.stamp.eu/rest/mobile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"latitude": 0,
"longitude": 0,
"accuracy": 1,
"queued_at": "2023-11-07T05:31:56Z",
"comment": "<string>",
"metadata": {
"app_version": "<string>",
"device_model": "<string>",
"os_version": "<string>"
}
}
'import requests
url = "https://{tenant}.stamp.eu/rest/mobile"
payload = {
"latitude": 0,
"longitude": 0,
"accuracy": 1,
"queued_at": "2023-11-07T05:31:56Z",
"comment": "<string>",
"metadata": {
"app_version": "<string>",
"device_model": "<string>",
"os_version": "<string>"
}
}
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({
latitude: 0,
longitude: 0,
accuracy: 1,
queued_at: '2023-11-07T05:31:56Z',
comment: '<string>',
metadata: {app_version: '<string>', device_model: '<string>', os_version: '<string>'}
})
};
fetch('https://{tenant}.stamp.eu/rest/mobile', 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/mobile",
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([
'latitude' => 0,
'longitude' => 0,
'accuracy' => 1,
'queued_at' => '2023-11-07T05:31:56Z',
'comment' => '<string>',
'metadata' => [
'app_version' => '<string>',
'device_model' => '<string>',
'os_version' => '<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/mobile"
payload := strings.NewReader("{\n \"latitude\": 0,\n \"longitude\": 0,\n \"accuracy\": 1,\n \"queued_at\": \"2023-11-07T05:31:56Z\",\n \"comment\": \"<string>\",\n \"metadata\": {\n \"app_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"os_version\": \"<string>\"\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/mobile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"latitude\": 0,\n \"longitude\": 0,\n \"accuracy\": 1,\n \"queued_at\": \"2023-11-07T05:31:56Z\",\n \"comment\": \"<string>\",\n \"metadata\": {\n \"app_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"os_version\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/mobile")
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 \"latitude\": 0,\n \"longitude\": 0,\n \"accuracy\": 1,\n \"queued_at\": \"2023-11-07T05:31:56Z\",\n \"comment\": \"<string>\",\n \"metadata\": {\n \"app_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"os_version\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"state": "<string>",
"timestamp": "<string>",
"location": true,
"target_duration_seconds": 123,
"weekly_target_seconds": 123,
"weekly_seconds": 123,
"today_work_seconds": 123,
"today_pause_seconds": 123,
"overtime_account_seconds": 123,
"overtime_month_seconds": 123,
"company_name": "<string>",
"early": 123
}{
"message": "<string>"
}{
"message": "Keine Berechtigung für mobile Stempelung."
}{
"message": "<string>",
"errors": {}
}Stempelungen
Mobile Stempelung
Documented exception to the data-envelope standard (ADR 0005): the
payload stays flat for the mobile clients. early is only present when
the clock-in happened before the rostered start (milliseconds early).
POST
/
mobile
POST /rest/mobile — Mobile clock-in/out (authenticated)
curl --request POST \
--url https://{tenant}.stamp.eu/rest/mobile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"latitude": 0,
"longitude": 0,
"accuracy": 1,
"queued_at": "2023-11-07T05:31:56Z",
"comment": "<string>",
"metadata": {
"app_version": "<string>",
"device_model": "<string>",
"os_version": "<string>"
}
}
'import requests
url = "https://{tenant}.stamp.eu/rest/mobile"
payload = {
"latitude": 0,
"longitude": 0,
"accuracy": 1,
"queued_at": "2023-11-07T05:31:56Z",
"comment": "<string>",
"metadata": {
"app_version": "<string>",
"device_model": "<string>",
"os_version": "<string>"
}
}
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({
latitude: 0,
longitude: 0,
accuracy: 1,
queued_at: '2023-11-07T05:31:56Z',
comment: '<string>',
metadata: {app_version: '<string>', device_model: '<string>', os_version: '<string>'}
})
};
fetch('https://{tenant}.stamp.eu/rest/mobile', 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/mobile",
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([
'latitude' => 0,
'longitude' => 0,
'accuracy' => 1,
'queued_at' => '2023-11-07T05:31:56Z',
'comment' => '<string>',
'metadata' => [
'app_version' => '<string>',
'device_model' => '<string>',
'os_version' => '<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/mobile"
payload := strings.NewReader("{\n \"latitude\": 0,\n \"longitude\": 0,\n \"accuracy\": 1,\n \"queued_at\": \"2023-11-07T05:31:56Z\",\n \"comment\": \"<string>\",\n \"metadata\": {\n \"app_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"os_version\": \"<string>\"\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/mobile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"latitude\": 0,\n \"longitude\": 0,\n \"accuracy\": 1,\n \"queued_at\": \"2023-11-07T05:31:56Z\",\n \"comment\": \"<string>\",\n \"metadata\": {\n \"app_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"os_version\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/mobile")
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 \"latitude\": 0,\n \"longitude\": 0,\n \"accuracy\": 1,\n \"queued_at\": \"2023-11-07T05:31:56Z\",\n \"comment\": \"<string>\",\n \"metadata\": {\n \"app_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"os_version\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"state": "<string>",
"timestamp": "<string>",
"location": true,
"target_duration_seconds": 123,
"weekly_target_seconds": 123,
"weekly_seconds": 123,
"today_work_seconds": 123,
"today_pause_seconds": 123,
"overtime_account_seconds": 123,
"overtime_month_seconds": 123,
"company_name": "<string>",
"early": 123
}{
"message": "<string>"
}{
"message": "Keine Berechtigung für mobile Stempelung."
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
Body
application/json
Response
Stempelung erfasst
⌘I