Clock Out
curl --request POST \
--url https://api.everhour.com/users/{user_id}/timecards/clock-out \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"userDate": "2020-11-27"
}
'import requests
url = "https://api.everhour.com/users/{user_id}/timecards/clock-out"
payload = { "userDate": "2020-11-27" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({userDate: '2020-11-27'})
};
fetch('https://api.everhour.com/users/{user_id}/timecards/clock-out', 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://api.everhour.com/users/{user_id}/timecards/clock-out",
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([
'userDate' => '2020-11-27'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://api.everhour.com/users/{user_id}/timecards/clock-out"
payload := strings.NewReader("{\n \"userDate\": \"2020-11-27\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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://api.everhour.com/users/{user_id}/timecards/clock-out")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userDate\": \"2020-11-27\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/users/{user_id}/timecards/clock-out")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userDate\": \"2020-11-27\"\n}"
response = http.request(request)
puts response.read_body{
"user": 69,
"workTime": 28800,
"clockIn": "09:00",
"clockOut": "18:00",
"breakTime": 3600,
"history": [
{
"action": "clock-in",
"previousTime": "08:00",
"time": "09:00",
"trigger": "manually"
}
],
"date": "<string>",
"weekId": 123,
"isLocked": true,
"invalid": {},
"lockReasons": [
"<string>"
]
}Timecards
Clock Out
Clock a user out. Closes the current timecard segment.
POST
/
users
/
{user_id}
/
timecards
/
clock-out
Clock Out
curl --request POST \
--url https://api.everhour.com/users/{user_id}/timecards/clock-out \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"userDate": "2020-11-27"
}
'import requests
url = "https://api.everhour.com/users/{user_id}/timecards/clock-out"
payload = { "userDate": "2020-11-27" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({userDate: '2020-11-27'})
};
fetch('https://api.everhour.com/users/{user_id}/timecards/clock-out', 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://api.everhour.com/users/{user_id}/timecards/clock-out",
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([
'userDate' => '2020-11-27'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://api.everhour.com/users/{user_id}/timecards/clock-out"
payload := strings.NewReader("{\n \"userDate\": \"2020-11-27\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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://api.everhour.com/users/{user_id}/timecards/clock-out")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userDate\": \"2020-11-27\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/users/{user_id}/timecards/clock-out")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userDate\": \"2020-11-27\"\n}"
response = http.request(request)
puts response.read_body{
"user": 69,
"workTime": 28800,
"clockIn": "09:00",
"clockOut": "18:00",
"breakTime": 3600,
"history": [
{
"action": "clock-in",
"previousTime": "08:00",
"time": "09:00",
"trigger": "manually"
}
],
"date": "<string>",
"weekId": 123,
"isLocked": true,
"invalid": {},
"lockReasons": [
"<string>"
]
}Authorizations
Path Parameters
User ID
Example:
89
Body
application/json
Current user date, if not specified we will rely on user profile timezone.
Example:
"2020-11-27"
Response
OK
User ID
Example:
69
Working time in seconds
Example:
28800
Clock-in time in user timezone
Example:
"09:00"
Clock-out time in user timezone
Example:
"18:00"
Breaks duration in seconds
Example:
3600
Show child attributes
Show child attributes
Format: Y-m-d
Week identifier (YYWW).
Validation issues for the timecard, if any.
⌘I
