API reference
Equipment & materials
16 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.
GET/v1/equipmentThe equipment register (cost rates only for people who see costs). mine=true: what I have checked out.
The equipment register (cost rates only for people who see costs). mine=true: what I have checked out.
Query parameters
| Name | Type | Description |
|---|---|---|
status | "available" | "in_use" | "maintenance" | |
search | string | |
include_archived | boolean | |
holder_user_id | string | |
mine | boolean |
Example
curl "https://ca-api.clocklap.com/v1/equipment" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/equipmentAdd equipment
Add equipment
Body (JSON)
| Name | Type | Description |
|---|---|---|
namerequired | string | |
type | string or null | |
serial | string or null | |
hourly_cost_cents | integer | |
status | "available" | "in_use" | "maintenance" | |
notes | string or null |
Example
curl -X POST "https://ca-api.clocklap.com/v1/equipment" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example"}'Responses
200
GET/v1/equipment-usageEquipment hours logged (managers: everyone’s; others: their own)
Equipment hours logged (managers: everyone’s; others: their own)
Query parameters
| Name | Type | Description |
|---|---|---|
project_id | string | |
work_order_id | string | |
equipment_id | string | |
user_id | string | |
from | string | |
to | string | |
limit | integer |
Example
curl "https://ca-api.clocklap.com/v1/equipment-usage" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/equipment-usageLog equipment hours on a project or work order (client_ref makes offline retries safe)
Log equipment hours on a project or work order (client_ref makes offline retries safe)
Body (JSON)
| Name | Type | Description |
|---|---|---|
equipment_idrequired | string | |
hoursrequired | number | |
used_on | string | |
project_id | string or null | |
work_order_id | string or null | |
time_entry_id | string or null | |
user_id | string | |
note | string or null | |
client_ref | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/equipment-usage" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"equipment_id":"equ_01J…","hours":1}'Responses
200
DELETE/v1/equipment-usage/{id}Delete one equipment usage
Delete one equipment usage
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X DELETE "https://ca-api.clocklap.com/v1/equipment-usage/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/equipment/{id}One item with its check-out history and logged hours
One item with its check-out history and logged hours
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/equipment/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
PATCH/v1/equipment/{id}Edit equipment, send it to maintenance, or archive it
Edit equipment, send it to maintenance, or archive it
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
name | string | |
type | string or null | |
serial | string or null | |
hourly_cost_cents | integer | |
status | "available" | "in_use" | "maintenance" | |
notes | string or null | |
archived | boolean |
Example
curl -X PATCH "https://ca-api.clocklap.com/v1/equipment/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
200
POST/v1/equipment/{id}/check-inCheck equipment back in
Check equipment back in
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
note | string or null |
Example
curl -X POST "https://ca-api.clocklap.com/v1/equipment/{id}/check-in" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"note":"string"}'Responses
200
POST/v1/equipment/{id}/check-outCheck out to a person or a site (yourself, or anyone for equipment managers)
Check out to a person or a site (yourself, or anyone for equipment managers)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
user_id | string or null | |
location_id | string or null | |
note | string or null |
Example
curl -X POST "https://ca-api.clocklap.com/v1/equipment/{id}/check-out" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id":"use_01J…","location_id":"loc_01J…","note":"string"}'Responses
200
GET/v1/material-usageMaterials used (managers: everyone’s; others: their own)
Materials used (managers: everyone’s; others: their own)
Query parameters
| Name | Type | Description |
|---|---|---|
project_id | string | |
work_order_id | string | |
material_id | string | |
user_id | string | |
from | string | |
to | string | |
limit | integer |
Example
curl "https://ca-api.clocklap.com/v1/material-usage" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/material-usageRecord materials used on a project or work order (client_ref makes offline retries safe)
Record materials used on a project or work order (client_ref makes offline retries safe)
Body (JSON)
| Name | Type | Description |
|---|---|---|
material_idrequired | string | |
qtyrequired | number | |
used_on | string | |
project_id | string or null | |
work_order_id | string or null | |
user_id | string | |
note | string or null | |
client_ref | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/material-usage" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"material_id":"mat_01J…","qty":1}'Responses
200
DELETE/v1/material-usage/{id}Delete one material usage
Delete one material usage
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X DELETE "https://ca-api.clocklap.com/v1/material-usage/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/materialsThe materials catalog (costs and prices only for people who see costs)
The materials catalog (costs and prices only for people who see costs)
Query parameters
| Name | Type | Description |
|---|---|---|
search | string | |
include_archived | boolean |
Example
curl "https://ca-api.clocklap.com/v1/materials" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/materialsAdd a material to the catalog
Add a material to the catalog
Body (JSON)
| Name | Type | Description |
|---|---|---|
namerequired | string | |
sku | string or null | |
unit | string | |
unit_cost_cents | integer | |
unit_price_cents | integer or null |
Example
curl -X POST "https://ca-api.clocklap.com/v1/materials" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example"}'Responses
200
PATCH/v1/materials/{id}Edit or archive a material
Edit or archive a material
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
name | string | |
sku | string or null | |
unit | string | |
unit_cost_cents | integer | |
unit_price_cents | integer or null | |
archived | boolean |
Example
curl -X PATCH "https://ca-api.clocklap.com/v1/materials/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
200
GET/v1/me/equipmentEquipment checked out to me
Equipment checked out to me
Example
curl "https://ca-api.clocklap.com/v1/me/equipment" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200