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

Reference

Errors

Errors come back as problem details with a stable code for your program and a plain detail for people. Here is what each code means and what to do.

{
  "type": "https://developer.clocklap.com/errors/entry_locked",
  "title": "Conflict",
  "status": 409,
  "code": "entry_locked",
  "detail": "This pay period is locked. Unlock it before changing its hours.",
  "request_id": "req_4f1c2a9b7d3e5f60"
}

Retrying#

  • Retry 429 (after RateLimit-Reset), 5xx and network errors, with backoff, and an Idempotency-Key so nothing happens twice.
  • Don't retry other 4xx unchanged: fix what detail says first.

Codes#

StatusCodeMeaning and what to do
400validation_failedA field is missing or the wrong shape. detail names each one, as field: problem.
400invalid_referenceAn ID you sent doesn’t exist (for example a location_id).
400invalid_date invalid_range range_too_longA date or range is wrong or too long. detail says the limit.
400unknown_scope unknown_event_type invalid_expandA value isn’t one of those allowed.
400invalid_url insecure_url private_urlA webhook URL must be HTTPS and reach a public address.
401unauthorizedNo key, or the key is wrong, revoked or expired.
403forbiddenThe key’s scopes don’t allow this, or a person is needed rather than a key.
403workspace_suspendedThe workspace is suspended. An owner can resolve it in Billing.
404not_foundNothing with that ID, or you can’t see it.
409conflictIt already exists (for example an email in use).
409overlap overlapsThe shift would overlap another of the same person’s.
409entry_lockedThe pay period is locked, so its hours can’t change.
409idempotency_key_busyThe first request with this Idempotency-Key is still running. Retry shortly.
409idempotency_key_reusedThis Idempotency-Key was used for a different request. Use a new one.
421wrong_regionThe key belongs to the other region. The body’s api_url is the address to use.
400 or 422reason_requiredChanges to hours need a reason.
400 or 422unassigned_locationThe person isn’t assigned to that location. Add them to it first.
429rate_limitedToo many requests. Wait for RateLimit-Reset seconds.
500internal_errorSomething went wrong on our side. Retry with backoff; if it persists, send us the request_id.

Punch errors#

POST /v1/punches answers 422 “Punch not applied” with one of these codes when a punch can't apply:

CodeMeaning
already_clocked_inThey’re already clocked in.
not_clocked_inThere’s no open shift to clock out of or break in.
already_on_breakThey’re already on a break.
not_on_breakThere’s no break to end.
before_clock_inThe time is before the shift started.
future_timeThe time is in the future.
too_oldThe time is too long ago to record as a punch: add a shift instead.
overlapIt would overlap another shift.
period_lockedThe pay period is locked.
unassigned_locationThey aren’t assigned to that location.
method_disabledThat way of clocking in is turned off for the site.
gps_requiredThe site needs a location with each punch.
photo_requiredThe site needs a photo with each punch.
mock_locationThe location came from a fake-GPS app.