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

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

NameTypeDescription
daterequiredstring
location_idstring
template_idstring

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

NameTypeDescription
template_idstring
location_idstring
user_idstring
fromstringYYYY-MM-DD (the workspace’s day) or an ISO time
tostringYYYY-MM-DD (inclusive) or an ISO time
flaggedboolean
mineboolean
moment"on_demand" | "clock_in" | "clock_out" | "arrival" | "recurring"
limitinteger
cursorstring

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)

NameTypeDescription
idstring
template_idrequiredstring
versioninteger
answersrequiredobject
location_idstring or null
project_idstring or null
time_entry_idstring or null
moment"on_demand" | "clock_in" | "clock_out" | "arrival" | "recurring"
latnumber or null
lngnumber or null
accuracy_mnumber or null
submitted_atstring (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

NameTypeDescription
template_idstring
location_idstring
user_idstring
fromstringYYYY-MM-DD (the workspace’s day) or an ISO time
tostringYYYY-MM-DD (inclusive) or an ISO time
flaggedboolean
mineboolean
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

NameTypeDescription
idrequiredstring

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

NameTypeDescription
idrequiredstring

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

NameTypeDescription
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)

NameTypeDescription
namestring
descriptionstring or null
category"daily_report" | "toolbox_talk" | "inspection" | "equipment" | "incident" | "hazard" | "sign_off" | "other"
fieldsarray of object
fields[].idrequiredstring
fields[].typerequiredstring (14 values)
fields[].labelrequiredstring
fields[].helpstring
fields[].requiredboolean
fields[].optionsarray of string
fields[].allow_naboolean
fields[].minnumber
fields[].maxnumber
fields[].unitstring
fields[].scaleinteger
fields[].max_photosinteger
fields[].multipleboolean
fields[].flagobject
triggersobject
triggers.on_demandboolean
triggers.clock_in"off" | "optional" | "required"
triggers.clock_out"off" | "optional" | "required"
triggers.block_clock_outboolean
triggers.arrivalboolean
triggers.recurringobject or null
audienceobject
audience.location_idsarray of string
audience.project_idsarray of string
audience.role_keysarray of string
library_keystring

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

NameTypeDescription
idrequiredstring

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

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
namestring
descriptionstring or null
category"daily_report" | "toolbox_talk" | "inspection" | "equipment" | "incident" | "hazard" | "sign_off" | "other"
fieldsarray of object
fields[].idrequiredstring
fields[].typerequiredstring (14 values)
fields[].labelrequiredstring
fields[].helpstring
fields[].requiredboolean
fields[].optionsarray of string
fields[].allow_naboolean
fields[].minnumber
fields[].maxnumber
fields[].unitstring
fields[].scaleinteger
fields[].max_photosinteger
fields[].multipleboolean
fields[].flagobject
triggersobject
triggers.on_demandboolean
triggers.clock_in"off" | "optional" | "required"
triggers.clock_out"off" | "optional" | "required"
triggers.block_clock_outboolean
triggers.arrivalboolean
triggers.recurringobject or null
audienceobject
audience.location_idsarray of string
audience.project_idsarray of string
audience.role_keysarray 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

NameTypeDescription
idrequiredstring
versionrequiredinteger

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)

NameTypeDescription
idsrequiredarray 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