API reference
Calendars
13 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.
GET/v1/locations/{id}/calendar-feedThe site’s calendar link for managers (everyone’s shifts, jobs and time off there)
The site’s calendar link for managers (everyone’s shifts, jobs and time off there)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/locations/{id}/calendar-feed" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/locations/{id}/calendar-feedTurn on or replace the site’s calendar link (needs schedule access there)
Turn on or replace the site’s calendar link (needs schedule access there)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/locations/{id}/calendar-feed" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
DELETE/v1/locations/{id}/calendar-feedTurn the site’s calendar link off
Turn the site’s calendar link off
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X DELETE "https://ca-api.clocklap.com/v1/locations/{id}/calendar-feed" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/me/calendarYour calendar link (iCal feed) and connected Google / Outlook calendars
Your calendar link (iCal feed) and connected Google / Outlook calendars
Example
curl "https://ca-api.clocklap.com/v1/me/calendar" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/me/calendar/connectionsConnect your Google or Outlook calendar: open the returned URL to sign in
Connect your Google or Outlook calendar: open the returned URL to sign in
Body (JSON)
| Name | Type | Description |
|---|---|---|
providerrequired | "google" | "microsoft" | |
return_to | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/me/calendar/connections" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"provider":"google","return_to":"string"}'Responses
200
PATCH/v1/me/calendar/connections/{id}Which calendar, what goes into it (shifts, jobs, time off) and whether its events show in My time
Which calendar, what goes into it (shifts, jobs, time off) and whether its events show in My time
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
calendar_id | string | |
push | array of "shift" | "work_order" | "time_off" | |
show_events | boolean |
Example
curl -X PATCH "https://ca-api.clocklap.com/v1/me/calendar/connections/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"calendar_id":"cal_01J…","push":["shift"],"show_events":true}'Responses
200
DELETE/v1/me/calendar/connections/{id}Disconnect: removes the events ClockLap added and forgets the sign-in
Disconnect: removes the events ClockLap added and forgets the sign-in
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X DELETE "https://ca-api.clocklap.com/v1/me/calendar/connections/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/me/calendar/connections/{id}/calendarsCalendars in the connected account you can write to
Calendars in the connected account you can write to
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/me/calendar/connections/{id}/calendars" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/me/calendar/connections/{id}/syncBring the calendar up to date now
Bring the calendar up to date now
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/me/calendar/connections/{id}/sync" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/me/calendar/eventsEvents in your connected calendars (not the ones ClockLap added), to add as time
Events in your connected calendars (not the ones ClockLap added), to add as time
Query parameters
| Name | Type | Description |
|---|---|---|
fromrequired | string | |
torequired | string |
Example
curl "https://ca-api.clocklap.com/v1/me/calendar/events" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/me/calendar/feedYour personal calendar link, if it is on
Your personal calendar link, if it is on
Example
curl "https://ca-api.clocklap.com/v1/me/calendar/feed" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/me/calendar/feedTurn on your calendar link, or make a new one (the old link stops working)
Turn on your calendar link, or make a new one (the old link stops working)
Example
curl -X POST "https://ca-api.clocklap.com/v1/me/calendar/feed" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
DELETE/v1/me/calendar/feedTurn your calendar link off
Turn your calendar link off
Example
curl -X DELETE "https://ca-api.clocklap.com/v1/me/calendar/feed" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200