Skip to main content
GET
/
timecards
Get All Timecards
curl --request GET \
  --url https://api.everhour.com/timecards \
  --header 'X-Api-Key: <api-key>'
import requests

url = "https://api.everhour.com/timecards"

headers = {"X-Api-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};

fetch('https://api.everhour.com/timecards', 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/timecards",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.everhour.com/timecards"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Api-Key", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.everhour.com/timecards")
  .header("X-Api-Key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.everhour.com/timecards")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'

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

X-Api-Key
string
header
required

Query Parameters

from
string

Date from (2 weeks ago by default)

Example:

"2020-10-01"

to
string

Date to

Example:

"2020-11-01"

Response

OK

user
number
required

User ID

Example:

69

workTime
number
required

Working time in seconds

Example:

28800

clockIn
string

Clock-in time in user timezone

Example:

"09:00"

clockOut
string

Clock-out time in user timezone

Example:

"18:00"

breakTime
number

Breaks duration in seconds

Example:

3600

history
object[]
date
string

Format: Y-m-d

weekId
integer

Week identifier (YYWW).

isLocked
boolean
invalid
object | null

Validation issues for the timecard, if any.

lockReasons
string[]