API reference
Site requests
6 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.
GET/v1/site-requestsMy requests, plus the ones I can decide
My requests, plus the ones I can decide
Query parameters
| Name | Type | Description |
|---|---|---|
status | "pending" | "approved" | "rejected" | "cancelled" | |
mine | boolean | |
limit | integer |
Example
curl "https://ca-api.clocklap.com/v1/site-requests" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/site-requestsAsk to work at a site, or to add a new place (optionally until a date)
Ask to work at a site, or to add a new place (optionally until a date)
Body (JSON)
| Name | Type | Description |
|---|---|---|
kindrequired | "join_site" | "new_site" | |
location_id | string | |
name | string | |
address | string or null | |
lat | number or null | |
lng | number or null | |
radius_m | number | |
parent_id | string or null | |
starts_on | string or null | |
ends_on | string or null | |
note | string or null |
Example
curl -X POST "https://ca-api.clocklap.com/v1/site-requests" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"join_site"}'Responses
200
POST/v1/site-requests/{id}/approveApprove (optionally adjusting name, address, geofence size, region or end date)
Approve (optionally adjusting name, address, geofence size, region or end date)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
note | string or null | |
name | string | |
address | string or null | |
radius_m | number | |
parent_id | string or null | |
ends_on | string or null |
Example
curl -X POST "https://ca-api.clocklap.com/v1/site-requests/{id}/approve" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
200
POST/v1/site-requests/{id}/cancelCancel
Cancel
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/site-requests/{id}/cancel" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/site-requests/{id}/rejectDecline, with an optional note
Decline, with an optional note
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
note | string or null | |
name | string | |
address | string or null | |
radius_m | number | |
parent_id | string or null | |
ends_on | string or null |
Example
curl -X POST "https://ca-api.clocklap.com/v1/site-requests/{id}/reject" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
200
GET/v1/site-requests/optionsWhether people can ask for sites here, and the sites they could ask to join
Whether people can ask for sites here, and the sites they could ask to join
Example
curl "https://ca-api.clocklap.com/v1/site-requests/options" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200