Skip to content
ClockLap Developers
API reference clocklap.com Get an API key

API reference

Schedule

31 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.

GET/v1/me/availabilityWhen I can't (or prefer to) work

When I can't (or prefer to) work

Example

curl "https://ca-api.clocklap.com/v1/me/availability" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

PUT/v1/me/availabilityReplace my weekly availability and upcoming date exceptions

Replace my weekly availability and upcoming date exceptions

Body (JSON)

NameTypeDescription
weeklyrequiredarray of object
weekly[].weekdayinteger or null
weekly[].datestring or null
weekly[].start_timestring or null
weekly[].end_timestring or null
weekly[].type"unavailable" | "prefer"
weekly[].notestring or null
datesrequiredarray of object
dates[].weekdayinteger or null
dates[].datestring or null
dates[].start_timestring or null
dates[].end_timestring or null
dates[].type"unavailable" | "prefer"
dates[].notestring or null

Example

curl -X PUT "https://ca-api.clocklap.com/v1/me/availability" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"weekly":[{}],"dates":[{}]}'

Responses

200

GET/v1/me/scheduleMy upcoming shifts and days off

My upcoming shifts and days off

Query parameters

NameTypeDescription
daysinteger

Example

curl "https://ca-api.clocklap.com/v1/me/schedule" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/me/shiftsMy next shift, upcoming shifts, open shifts, offers and requests

My next shift, upcoming shifts, open shifts, offers and requests

Query parameters

NameTypeDescription
daysinteger

Example

curl "https://ca-api.clocklap.com/v1/me/shifts" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/scheduleWeek board: shifts, time off and hours worked per person

Week board: shifts, time off and hours worked per person

Query parameters

NameTypeDescription
weekstring
location_idstring

Example

curl "https://ca-api.clocklap.com/v1/schedule" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/schedule/conflictsOverlaps, time off, unavailability and weekly hours over the limit

Overlaps, time off, unavailability and weekly hours over the limit

Query parameters

NameTypeDescription
weekstringAny day in the week (default: this week)
location_idstring

Example

curl "https://ca-api.clocklap.com/v1/schedule/conflicts" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/schedule/copyCopy one person's week to others

Copy one person's week to others

Body (JSON)

NameTypeDescription
from_user_idrequiredstring
to_user_idsrequiredarray of string

Example

curl -X POST "https://ca-api.clocklap.com/v1/schedule/copy" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from_user_id":"fro_01J…","to_user_ids":["string"]}'

Responses

200

POST/v1/schedule/copy-weekCopy last week (or from_week) into this week as drafts

Copy last week (or from_week) into this week as drafts

Body (JSON)

NameTypeDescription
weekstringAny day in the week (default: this week)
location_idstring
from_weekstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/schedule/copy-week" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"week":"string","location_id":"loc_01J…","from_week":"string"}'

Responses

200

POST/v1/schedule/generateDraft the week from everyone's weekly pattern

Draft the week from everyone's weekly pattern

Body (JSON)

NameTypeDescription
weekstringAny day in the week (default: this week)
location_idstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/schedule/generate" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"week":"string","location_id":"loc_01J…"}'

Responses

200

GET/v1/schedule/publishWhat publishing the week would do

What publishing the week would do

Query parameters

NameTypeDescription
weekstringAny day in the week (default: this week)
location_idstring

Example

curl "https://ca-api.clocklap.com/v1/schedule/publish" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/schedule/publishPublish the week's drafts and notify people (push and email)

Publish the week's drafts and notify people (push and email)

Body (JSON)

NameTypeDescription
weekstringAny day in the week (default: this week)
location_idstring
notifyboolean

Example

curl -X POST "https://ca-api.clocklap.com/v1/schedule/publish" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"week":"string","location_id":"loc_01J…","notify":true}'

Responses

200

POST/v1/schedule/shiftsAdd a weekly shift

Add a weekly shift

Body (JSON)

NameTypeDescription
user_idrequiredstring
location_idrequiredstring
weekdayrequiredinteger
start_timerequiredstring
end_timerequiredstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/schedule/shifts" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"use_01J…","location_id":"loc_01J…","weekday":0,"start_time":"string","end_time":"string"}'

Responses

200

PATCH/v1/schedule/shifts/{id}Update one shift

Update one shift

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
location_idstring
weekdayinteger
start_timestring
end_timestring

Example

curl -X PATCH "https://ca-api.clocklap.com/v1/schedule/shifts/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location_id":"loc_01J…","weekday":0,"start_time":"string","end_time":"string"}'

Responses

200

DELETE/v1/schedule/shifts/{id}Delete one shift

Delete one shift

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X DELETE "https://ca-api.clocklap.com/v1/schedule/shifts/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/schedule/weekWeek grid: dated shifts, weekly pattern, open shifts, time off, availability and conflicts

Week grid: dated shifts, weekly pattern, open shifts, time off, availability and conflicts

Query parameters

NameTypeDescription
weekstringAny day in the week (default: this week)
location_idstring

Example

curl "https://ca-api.clocklap.com/v1/schedule/week" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/shift-requestsClaims, covers and swaps (waiting for a decision by default)

Claims, covers and swaps (waiting for a decision by default)

Query parameters

NameTypeDescription
status"waiting" | "all"
location_idstring
limitinteger

Example

curl "https://ca-api.clocklap.com/v1/shift-requests" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/shift-requests/{id}/acceptTake a colleague's offered shift, or agree to their swap

Take a colleague's offered shift, or agree to their swap

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/shift-requests/{id}/accept" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/shift-requests/{id}/approveApprove a claim, cover or swap

Approve a claim, cover or swap

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
notestring

Example

curl -X POST "https://ca-api.clocklap.com/v1/shift-requests/{id}/approve" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"note":"string"}'

Responses

200

POST/v1/shift-requests/{id}/cancelWithdraw my request (or back out of an offer I accepted)

Withdraw my request (or back out of an offer I accepted)

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/shift-requests/{id}/cancel" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/shift-requests/{id}/declineDecline a claim, cover or swap

Decline a claim, cover or swap

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
notestring

Example

curl -X POST "https://ca-api.clocklap.com/v1/shift-requests/{id}/decline" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"note":"string"}'

Responses

200

POST/v1/shift-requests/{id}/decline-offerTurn down an offer made to me

Turn down an offer made to me

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/shift-requests/{id}/decline-offer" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/shiftsDated shifts in a range (yours, or your team's)

Dated shifts in a range (yours, or your team's)

Query parameters

NameTypeDescription
fromrequiredstring
torequiredstring
user_idstring
location_idstring
status"draft" | "published" | "cancelled"
openboolean

Example

curl "https://ca-api.clocklap.com/v1/shifts" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/shiftsAdd a draft shift (or an open shift when no person is given)

Add a draft shift (or an open shift when no person is given)

Body (JSON)

NameTypeDescription
user_idstring or nullLeave empty for an open shift
location_idrequiredstring
daterequiredstringLocal date the shift starts, in the site's timezone
start_timerequiredstring
end_timerequiredstringAn end before the start runs past midnight
break_minutesinteger
positionstring or null
project_idstring or null
activity_idstring or null
notestring or null
slotsintegerOpen shifts: how many people are needed

Example

curl -X POST "https://ca-api.clocklap.com/v1/shifts" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location_id":"loc_01J…","date":"2026-10-26","start_time":"string","end_time":"string"}'

Responses

200

PATCH/v1/shifts/{id}Change a shift; a published shift changes now and the person is told

Change a shift; a published shift changes now and the person is told

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
user_idstring or nullLeave empty for an open shift
location_idstring
datestringLocal date the shift starts, in the site's timezone
start_timestring
end_timestringAn end before the start runs past midnight
break_minutesinteger
positionstring or null
project_idstring or null
activity_idstring or null
notestring or null
slotsintegerOpen shifts: how many people are needed

Example

curl -X PATCH "https://ca-api.clocklap.com/v1/shifts/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200

DELETE/v1/shifts/{id}Delete a draft, or cancel a published shift

Delete a draft, or cancel a published shift

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X DELETE "https://ca-api.clocklap.com/v1/shifts/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/shifts/{id}/claimClaim an open shift

Claim an open shift

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
notestring

Example

curl -X POST "https://ca-api.clocklap.com/v1/shifts/{id}/claim" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"note":"string"}'

Responses

200

POST/v1/shifts/{id}/offerOffer my shift for cover, or a swap with a colleague

Offer my shift for cover, or a swap with a colleague

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
typerequired"cover" | "swap"
to_user_idstring or null
other_shift_idstring or null
notestring or null

Example

curl -X POST "https://ca-api.clocklap.com/v1/shifts/{id}/offer" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"cover","to_user_id":"to__01J…","other_shift_id":"oth_01J…","note":"string"}'

Responses

200

GET/v1/shifts/{id}/swap-optionsColleagues' shifts at the same site I could swap this one for

Colleagues' shifts at the same site I could swap this one for

Path parameters

NameTypeDescription
idrequiredstring

Example

curl "https://ca-api.clocklap.com/v1/shifts/{id}/swap-options" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/shifts/openOpen shifts I can claim

Open shifts I can claim

Example

curl "https://ca-api.clocklap.com/v1/shifts/open" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/users/{id}/availabilitySomeone's availability

Someone's availability

Path parameters

NameTypeDescription
idrequiredstring

Example

curl "https://ca-api.clocklap.com/v1/users/{id}/availability" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

PUT/v1/users/{id}/availabilitySet availability for someone you schedule

Set availability for someone you schedule

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
weeklyrequiredarray of object
weekly[].weekdayinteger or null
weekly[].datestring or null
weekly[].start_timestring or null
weekly[].end_timestring or null
weekly[].type"unavailable" | "prefer"
weekly[].notestring or null
datesrequiredarray of object
dates[].weekdayinteger or null
dates[].datestring or null
dates[].start_timestring or null
dates[].end_timestring or null
dates[].type"unavailable" | "prefer"
dates[].notestring or null

Example

curl -X PUT "https://ca-api.clocklap.com/v1/users/{id}/availability" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"weekly":[{}],"dates":[{}]}'

Responses

200