curl --request POST \
--url https://api-{region}.sesametime.com/schedule/v1/work-entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employeeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workEntryIn": {
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"workBreakId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workCheckTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workEntryOut": {
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
}
}
}
'import requests
url = "https://api-{region}.sesametime.com/schedule/v1/work-entries"
payload = {
"employeeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workEntryIn": {
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"workBreakId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workCheckTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workEntryOut": {
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
}
}
}
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({
employeeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workEntryIn: {
date: '2020-01-01T10:00:00+01:00',
coordinates: {latitude: 123, longitude: 123}
},
workBreakId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workCheckTypeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workEntryOut: {
date: '2020-01-01T10:00:00+01:00',
coordinates: {latitude: 123, longitude: 123}
}
})
};
fetch('https://api-{region}.sesametime.com/schedule/v1/work-entries', 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-{region}.sesametime.com/schedule/v1/work-entries",
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([
'employeeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workEntryIn' => [
'date' => '2020-01-01T10:00:00+01:00',
'coordinates' => [
'latitude' => 123,
'longitude' => 123
]
],
'workBreakId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workCheckTypeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workEntryOut' => [
'date' => '2020-01-01T10:00:00+01:00',
'coordinates' => [
'latitude' => 123,
'longitude' => 123
]
]
]),
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://api-{region}.sesametime.com/schedule/v1/work-entries"
payload := strings.NewReader("{\n \"employeeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryIn\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"workBreakId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workCheckTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryOut\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\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://api-{region}.sesametime.com/schedule/v1/work-entries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employeeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryIn\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"workBreakId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workCheckTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryOut\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{region}.sesametime.com/schedule/v1/work-entries")
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 \"employeeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryIn\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"workBreakId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workCheckTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryOut\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workCheckTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "Lucas",
"lastName": "García",
"secondLastName": "<string>",
"email": "jsmith@example.com",
"imageProfileURL": "https://sesame-v2-prod-companies.s3.eu-west-3.amazonaws.com/48351485-1659-413d-bf7f-3ca34fadb521/public-read/g892f1fb-55a3-4e32-9cc9-7c19faa70gaa.png",
"code": 1,
"pin": 1000,
"phone": "+34 111 11 11 11",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"notificationEmail": "jsmith@example.com",
"language": "<string>",
"createdAt": "2020-01-01T10:00:00+01:00",
"updatedAt": "2020-01-01T10:00:00+01:00"
},
"contractId": "<string>",
"nid": "<string>",
"secondaryNid": "<string>",
"ssn": "<string>",
"pricePerHour": 123,
"accountNumber": "<string>",
"dateOfBirth": "2023-12-25",
"customFields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"value": "<string>",
"createdAt": "2020-01-01T10:00:00+01:00",
"updatedAt": "2020-01-01T10:00:00+01:00"
}
],
"createdAt": "2020-01-01T10:00:00+01:00",
"updatedAt": "2020-01-01T10:00:00+01:00",
"children": 2,
"disability": 25,
"address": "<string>",
"postalCode": "<string>",
"city": "<string>",
"province": "<string>",
"country": "ES",
"nationality": "ES",
"nationalities": [
"ES",
"FR"
],
"personalMail": "jsmith@example.com",
"maritalStatus": "<string>",
"emergencyPhone": "<string>",
"description": "<string>",
"salaryRange": "<string>",
"studyLevel": "<string>",
"professionalCategoryCode": "<string>",
"professionalCategoryDescription": "<string>",
"bic": "<string>",
"jobChargeId": "<string>",
"jobChargeName": "<string>",
"jobChargeDescription": "<string>",
"jobChargeCompetencies": "<string>",
"language": "es-ES",
"workPhone": "+34 111 11 11 11",
"mainRecruiter": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "Lucas",
"lastName": "García",
"secondLastName": "<string>",
"imageProfileURL": "https://sesame-v2-prod-companies.s3.eu-west-3.amazonaws.com/48351485-1659-413d-bf7f-3ca34fadb521/public-read/g892f1fb-55a3-4e32-9cc9-7c19faa70gaa.png",
"email": "jsmith@example.com",
"workCheckTypeColor": "#FF0000",
"workCheckTypeName": "Remote"
},
"nfc": "<string>",
"contributionGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"workEntryType": "<string>",
"workEntryIn": {
"origin": "<string>",
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
},
"officeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deviceName": "<string>"
},
"workEntryOut": {
"origin": "<string>",
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
},
"officeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deviceName": "<string>"
},
"workedSeconds": 123,
"createdAt": "2020-01-01T10:00:00+01:00",
"updatedAt": "2020-01-01T10:00:00+01:00",
"deletedAt": "2020-01-01T10:00:00+01:00"
},
"meta": {
"currentPage": 1,
"lastPage": 1,
"total": 1,
"perPage": 1
}
}{
"message": "Invalid or missing API Key",
"code": "UNAUTHORIZED"
}{
"message": "Evaluation with ID 123e4567-e89b-12d3-a456-426614174000 was not found",
"code": "EVALUATION_NOT_FOUND"
}{
"message": "Unprocessable entity",
"errors": {
"workBreakId": [
"validator.incompatible_work_break"
]
}
}Create Work Entry
Creates a work entry (clock-in/clock-out) for an employee. The workEntryType and workBreakId fields are mutually constrained: a pause entry requires a workBreakId, and work entries must not carry one. Sending an inconsistent combination returns a 422 with the validator.incompatible_work_break error.
curl --request POST \
--url https://api-{region}.sesametime.com/schedule/v1/work-entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employeeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workEntryIn": {
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"workBreakId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workCheckTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workEntryOut": {
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
}
}
}
'import requests
url = "https://api-{region}.sesametime.com/schedule/v1/work-entries"
payload = {
"employeeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workEntryIn": {
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"workBreakId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workCheckTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workEntryOut": {
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
}
}
}
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({
employeeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workEntryIn: {
date: '2020-01-01T10:00:00+01:00',
coordinates: {latitude: 123, longitude: 123}
},
workBreakId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workCheckTypeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workEntryOut: {
date: '2020-01-01T10:00:00+01:00',
coordinates: {latitude: 123, longitude: 123}
}
})
};
fetch('https://api-{region}.sesametime.com/schedule/v1/work-entries', 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-{region}.sesametime.com/schedule/v1/work-entries",
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([
'employeeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workEntryIn' => [
'date' => '2020-01-01T10:00:00+01:00',
'coordinates' => [
'latitude' => 123,
'longitude' => 123
]
],
'workBreakId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workCheckTypeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workEntryOut' => [
'date' => '2020-01-01T10:00:00+01:00',
'coordinates' => [
'latitude' => 123,
'longitude' => 123
]
]
]),
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://api-{region}.sesametime.com/schedule/v1/work-entries"
payload := strings.NewReader("{\n \"employeeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryIn\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"workBreakId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workCheckTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryOut\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\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://api-{region}.sesametime.com/schedule/v1/work-entries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employeeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryIn\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"workBreakId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workCheckTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryOut\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{region}.sesametime.com/schedule/v1/work-entries")
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 \"employeeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryIn\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"workBreakId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workCheckTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workEntryOut\": {\n \"date\": \"2020-01-01T10:00:00+01:00\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workCheckTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "Lucas",
"lastName": "García",
"secondLastName": "<string>",
"email": "jsmith@example.com",
"imageProfileURL": "https://sesame-v2-prod-companies.s3.eu-west-3.amazonaws.com/48351485-1659-413d-bf7f-3ca34fadb521/public-read/g892f1fb-55a3-4e32-9cc9-7c19faa70gaa.png",
"code": 1,
"pin": 1000,
"phone": "+34 111 11 11 11",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"notificationEmail": "jsmith@example.com",
"language": "<string>",
"createdAt": "2020-01-01T10:00:00+01:00",
"updatedAt": "2020-01-01T10:00:00+01:00"
},
"contractId": "<string>",
"nid": "<string>",
"secondaryNid": "<string>",
"ssn": "<string>",
"pricePerHour": 123,
"accountNumber": "<string>",
"dateOfBirth": "2023-12-25",
"customFields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"value": "<string>",
"createdAt": "2020-01-01T10:00:00+01:00",
"updatedAt": "2020-01-01T10:00:00+01:00"
}
],
"createdAt": "2020-01-01T10:00:00+01:00",
"updatedAt": "2020-01-01T10:00:00+01:00",
"children": 2,
"disability": 25,
"address": "<string>",
"postalCode": "<string>",
"city": "<string>",
"province": "<string>",
"country": "ES",
"nationality": "ES",
"nationalities": [
"ES",
"FR"
],
"personalMail": "jsmith@example.com",
"maritalStatus": "<string>",
"emergencyPhone": "<string>",
"description": "<string>",
"salaryRange": "<string>",
"studyLevel": "<string>",
"professionalCategoryCode": "<string>",
"professionalCategoryDescription": "<string>",
"bic": "<string>",
"jobChargeId": "<string>",
"jobChargeName": "<string>",
"jobChargeDescription": "<string>",
"jobChargeCompetencies": "<string>",
"language": "es-ES",
"workPhone": "+34 111 11 11 11",
"mainRecruiter": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "Lucas",
"lastName": "García",
"secondLastName": "<string>",
"imageProfileURL": "https://sesame-v2-prod-companies.s3.eu-west-3.amazonaws.com/48351485-1659-413d-bf7f-3ca34fadb521/public-read/g892f1fb-55a3-4e32-9cc9-7c19faa70gaa.png",
"email": "jsmith@example.com",
"workCheckTypeColor": "#FF0000",
"workCheckTypeName": "Remote"
},
"nfc": "<string>",
"contributionGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"workEntryType": "<string>",
"workEntryIn": {
"origin": "<string>",
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
},
"officeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deviceName": "<string>"
},
"workEntryOut": {
"origin": "<string>",
"date": "2020-01-01T10:00:00+01:00",
"coordinates": {
"latitude": 123,
"longitude": 123
},
"officeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deviceName": "<string>"
},
"workedSeconds": 123,
"createdAt": "2020-01-01T10:00:00+01:00",
"updatedAt": "2020-01-01T10:00:00+01:00",
"deletedAt": "2020-01-01T10:00:00+01:00"
},
"meta": {
"currentPage": 1,
"lastPage": 1,
"total": 1,
"perPage": 1
}
}{
"message": "Invalid or missing API Key",
"code": "UNAUTHORIZED"
}{
"message": "Evaluation with ID 123e4567-e89b-12d3-a456-426614174000 was not found",
"code": "EVALUATION_NOT_FOUND"
}{
"message": "Unprocessable entity",
"errors": {
"workBreakId": [
"validator.incompatible_work_break"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Create a Work Entry
Employee identifier.
Type of work entry. Use pause for break entries (requires workBreakId) and work for regular work entries (must not include workBreakId).
work, pause Show child attributes
Show child attributes
Work break identifier. Required when workEntryType is pause. Must be omitted (or null) when workEntryType is work.
Work check type identifier. Only applicable when workEntryType is work.
Show child attributes
Show child attributes
Was this page helpful?