API reference
Forms
16 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.
GET/v1/forms/importWhether paper forms can be read (needs the workspace’s own AI key)
Whether paper forms can be read (needs the workspace’s own AI key)
Example
curl "https://ca-api.clocklap.com/v1/forms/import" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/forms/importRead a photo or PDF of a paper form into a draft form (raw body; image/* or application/pdf). Nothing is saved.
Read a photo or PDF of a paper form into a draft form (raw body; image/* or application/pdf). Nothing is saved.
Example
curl -X POST "https://ca-api.clocklap.com/v1/forms/import" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/forms/libraryReady-made forms to start from
Ready-made forms to start from
Example
curl "https://ca-api.clocklap.com/v1/forms/library" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/forms/mineThe forms meant for me, what’s due on my shift, and what I sent lately (the app keeps it for offline)
The forms meant for me, what’s due on my shift, and what I sent lately (the app keeps it for offline)
Example
curl "https://ca-api.clocklap.com/v1/forms/mine" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/forms/report.pdfEvery form sent on a day, as one PDF report (a cover list, then each form)
Every form sent on a day, as one PDF report (a cover list, then each form)
Query parameters
| Name | Type | Description |
|---|---|---|
daterequired | string | |
location_id | string | |
template_id | string |
Example
curl "https://ca-api.clocklap.com/v1/forms/report.pdf" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/forms/submissionsSent forms: mine, or those in my scope with forms.read
Sent forms: mine, or those in my scope with forms.read
Query parameters
| Name | Type | Description |
|---|---|---|
template_id | string | |
location_id | string | |
user_id | string | |
from | string | YYYY-MM-DD (the workspace’s day) or an ISO time |
to | string | YYYY-MM-DD (inclusive) or an ISO time |
flagged | boolean | |
mine | boolean | |
moment | "on_demand" | "clock_in" | "clock_out" | "arrival" | "recurring" | |
limit | integer | |
cursor | string |
Example
curl "https://ca-api.clocklap.com/v1/forms/submissions" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/forms/submissionsSend a filled-in form. Idempotent on id (made on the phone). Upload photos first with POST /media.
Send a filled-in form. Idempotent on id (made on the phone). Upload photos first with POST /media.
Body (JSON)
| Name | Type | Description |
|---|---|---|
id | string | |
template_idrequired | string | |
version | integer | |
answersrequired | object | |
location_id | string or null | |
project_id | string or null | |
time_entry_id | string or null | |
moment | "on_demand" | "clock_in" | "clock_out" | "arrival" | "recurring" | |
lat | number or null | |
lng | number or null | |
accuracy_m | number or null | |
submitted_at | string (date-time) |
Example
curl -X POST "https://ca-api.clocklap.com/v1/forms/submissions" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"template_id":"tem_01J…","answers":{}}'Responses
200
GET/v1/forms/submissions.csvSent forms as CSV (one row each; filtered to one form, a column per question)
Sent forms as CSV (one row each; filtered to one form, a column per question)
Query parameters
| Name | Type | Description |
|---|---|---|
template_id | string | |
location_id | string | |
user_id | string | |
from | string | YYYY-MM-DD (the workspace’s day) or an ISO time |
to | string | YYYY-MM-DD (inclusive) or an ISO time |
flagged | boolean | |
mine | boolean | |
moment | "on_demand" | "clock_in" | "clock_out" | "arrival" | "recurring" |
Example
curl "https://ca-api.clocklap.com/v1/forms/submissions.csv" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/forms/submissions/{id}One sent form with its questions (as they were), answers, photos and signatures
One sent form with its questions (as they were), answers, photos and signatures
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/forms/submissions/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/forms/submissions/{id}/pdfOne sent form as a PDF report
One sent form as a PDF report
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/forms/submissions/{id}/pdf" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/forms/templatesForm templates (forms.manage, or forms.read to filter submissions)
Form templates (forms.manage, or forms.read to filter submissions)
Query parameters
| Name | Type | Description |
|---|---|---|
status | "active" | "archived" | "all" |
Example
curl "https://ca-api.clocklap.com/v1/forms/templates" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/forms/templatesCreate a form, from scratch or from the library (library_key), or from an imported draft
Create a form, from scratch or from the library (library_key), or from an imported draft
Body (JSON)
| Name | Type | Description |
|---|---|---|
name | string | |
description | string or null | |
category | "daily_report" | "toolbox_talk" | "inspection" | "equipment" | "incident" | "hazard" | "sign_off" | "other" | |
fields | array of object | |
fields[].idrequired | string | |
fields[].typerequired | string (14 values) | |
fields[].labelrequired | string | |
fields[].help | string | |
fields[].required | boolean | |
fields[].options | array of string | |
fields[].allow_na | boolean | |
fields[].min | number | |
fields[].max | number | |
fields[].unit | string | |
fields[].scale | integer | |
fields[].max_photos | integer | |
fields[].multiple | boolean | |
fields[].flag | object | |
triggers | object | |
triggers.on_demand | boolean | |
triggers.clock_in | "off" | "optional" | "required" | |
triggers.clock_out | "off" | "optional" | "required" | |
triggers.block_clock_out | boolean | |
triggers.arrival | boolean | |
triggers.recurring | object or null | |
audience | object | |
audience.location_ids | array of string | |
audience.project_ids | array of string | |
audience.role_keys | array of string | |
library_key | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/forms/templates" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
200
GET/v1/forms/templates/{id}A form with its current questions and version history
A form with its current questions and version history
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/forms/templates/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
PATCH/v1/forms/templates/{id}Change a form. New questions, name or description make a new version; sent forms keep theirs.
Change a form. New questions, name or description make a new version; sent forms keep theirs.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
name | string | |
description | string or null | |
category | "daily_report" | "toolbox_talk" | "inspection" | "equipment" | "incident" | "hazard" | "sign_off" | "other" | |
fields | array of object | |
fields[].idrequired | string | |
fields[].typerequired | string (14 values) | |
fields[].labelrequired | string | |
fields[].help | string | |
fields[].required | boolean | |
fields[].options | array of string | |
fields[].allow_na | boolean | |
fields[].min | number | |
fields[].max | number | |
fields[].unit | string | |
fields[].scale | integer | |
fields[].max_photos | integer | |
fields[].multiple | boolean | |
fields[].flag | object | |
triggers | object | |
triggers.on_demand | boolean | |
triggers.clock_in | "off" | "optional" | "required" | |
triggers.clock_out | "off" | "optional" | "required" | |
triggers.block_clock_out | boolean | |
triggers.arrival | boolean | |
triggers.recurring | object or null | |
audience | object | |
audience.location_ids | array of string | |
audience.project_ids | array of string | |
audience.role_keys | array of string | |
status | "active" | "archived" |
Example
curl -X PATCH "https://ca-api.clocklap.com/v1/forms/templates/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
200
GET/v1/forms/templates/{id}/versions/{version}The questions of one version
The questions of one version
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | |
versionrequired | integer |
Example
curl "https://ca-api.clocklap.com/v1/forms/templates/{id}/versions/{version}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/forms/templates/reorderThe order forms are listed in
The order forms are listed in
Body (JSON)
| Name | Type | Description |
|---|---|---|
idsrequired | array of string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/forms/templates/reorder" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ids":["string"]}'Responses
200