API reference
Work orders
11 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.
GET/v1/dispatchThe dispatch board: people by day with shifts, time off and jobs (with conflicts), and the jobs nobody has yet
The dispatch board: people by day with shifts, time off and jobs (with conflicts), and the jobs nobody has yet
Query parameters
| Name | Type | Description |
|---|---|---|
date | string | |
days | integer | |
location_id | string |
Example
curl "https://ca-api.clocklap.com/v1/dispatch" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/me/work-ordersMy jobs from yesterday on (the phone’s Today and Schedule), plus any still in progress
My jobs from yesterday on (the phone’s Today and Schedule), plus any still in progress
Query parameters
| Name | Type | Description |
|---|---|---|
from | string | |
days | integer |
Example
curl "https://ca-api.clocklap.com/v1/me/work-orders" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/work-ordersWork orders by day, status, site, project or person. People without manager rights see the jobs they are on.
Work orders by day, status, site, project or person. People without manager rights see the jobs they are on.
Query parameters
| Name | Type | Description |
|---|---|---|
from | string | |
to | string | |
status | string or array of string | Statuses: draft, scheduled, in_progress, done, invoiced, cancelled |
location_id | string | |
project_id | string | |
assignee_id | string | |
unassigned | boolean | |
mine | boolean | |
search | string | |
limit | integer | |
offset | integer |
Example
curl "https://ca-api.clocklap.com/v1/work-orders" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/work-ordersCreate a work order at a site; the people assigned are notified once it is scheduled
Create a work order at a site; the people assigned are notified once it is scheduled
Body (JSON)
| Name | Type | Description |
|---|---|---|
titlerequired | string | |
description | string or null | |
location_id | string or null | |
project_id | string or null | |
customer_id | string or null | |
scheduled_date | string or null | |
start_time | string or null | |
end_time | string or null | |
assignee_ids | array of string | |
checklist | array of object | |
checklist[].id | string | |
checklist[].textrequired | string | |
checklist[].done | boolean | |
form_id | string or null | |
status | "draft" | "scheduled" | "in_progress" | "done" | "invoiced" | "cancelled" | |
notify | boolean |
Example
curl -X POST "https://ca-api.clocklap.com/v1/work-orders" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"string"}'Responses
200
GET/v1/work-orders/{id}One work order with hours by person, equipment, materials and costing
One work order with hours by person, equipment, materials and costing
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/work-orders/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
PATCH/v1/work-orders/{id}Edit a work order (managers of its site). status done sends work_order.completed.
Edit a work order (managers of its site). status done sends work_order.completed.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
title | string | |
description | string or null | |
location_id | string or null | |
project_id | string or null | |
customer_id | string or null | |
scheduled_date | string or null | |
start_time | string or null | |
end_time | string or null | |
assignee_ids | array of string | |
checklist | array of object | |
checklist[].id | string | |
checklist[].textrequired | string | |
checklist[].done | boolean | |
form_id | string or null | |
status | "draft" | "scheduled" | "in_progress" | "done" | "invoiced" | "cancelled" | |
notify | boolean | |
if_unmodified_since | string (date-time) |
Example
curl -X PATCH "https://ca-api.clocklap.com/v1/work-orders/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
200
POST/v1/work-orders/{id}/checklist/{item}Tick or untick a checklist item
Tick or untick a checklist item
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | |
itemrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
donerequired | boolean |
Example
curl -X POST "https://ca-api.clocklap.com/v1/work-orders/{id}/checklist/{item}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"done":true}'Responses
200
POST/v1/work-orders/{id}/completeFinish a job (people on it, or managers)
Finish a job (people on it, or managers)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/work-orders/{id}/complete" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/work-orders/{id}/dispatchPut a job on people’s day and time (or back on the unassigned list with assignee_ids []); returns it with conflicts
Put a job on people’s day and time (or back on the unassigned list with assignee_ids []); returns it with conflicts
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
assignee_idsrequired | array of string | |
scheduled_date | string or null | |
start_time | string or null | |
end_time | string or null | |
notify | boolean |
Example
curl -X POST "https://ca-api.clocklap.com/v1/work-orders/{id}/dispatch" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assignee_ids":["string"]}'Responses
200
POST/v1/work-orders/{id}/invoiceTurn a job’s unbilled hours and priced materials into invoice lines, on a new draft or an existing draft (invoice_id)
Turn a job’s unbilled hours and priced materials into invoice lines, on a new draft or an existing draft (invoice_id)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
invoice_id | string or null |
Example
curl -X POST "https://ca-api.clocklap.com/v1/work-orders/{id}/invoice" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"invoice_id":"inv_01J…"}'Responses
200
POST/v1/work-orders/{id}/startStart a job (people on it, or managers)
Start a job (people on it, or managers)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/work-orders/{id}/start" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200