Skip to content

List the group's unrouted punches

GET
/api/tenants/{tenant}/sync/{name}/unrouted
curl --request GET \
--url 'http://127.0.0.1:9090/api/tenants/acme/sync/hq/unrouted?user_id=1001&after=0f3c2a9b8d7e6f5a4b3c2d1e0f9a8b7c&limit=100' \
--header 'Authorization: Basic <credentials>' \
--header 'X-Request-Id: 4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'

The punches of the group’s people that go nowhere until they are routed: a person with no route where routing is in use (no_route), someone the group does not have (unknown_person), several routes and nothing to decide between them (ambiguous), the policy’s route hook leaving it unrouted (policy) or failing (policy_failed), or the hook deciding it (deciding). Each was stored as a punch event, and told of by a punch.unrouted event; once routed it goes out again with the same id. In id order.

tenant
required
string

The tenant’s id.

Example
acme
name
required
string

The sync group’s id.

Example
hq
user_id
string

Only this person’s (their user id).

Example
1001
after
string

Only those after this punch id: the last of the page before.

Example
0f3c2a9b8d7e6f5a4b3c2d1e0f9a8b7c
limit
integer

How many at most: 100 unless given, at most 1000.

Example
100
X-Request-Id
string
<= 128 characters /^[A-Za-z0-9._:-]+$/

An id to follow the request by: answered back in X-Request-Id, and in the log, the audit trail and the events the request causes. 1 to 128 letters, digits, -, _, . or :; anything else is replaced by a new id.

Example
4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f

The punches set aside, in id order.

Media typeapplication/json
Array<object>

A punch set aside until it is routed, as the API shows it.

object
candidates
required

Its candidates when it was last worked out.

Array<object>

One route: a receiving system, a tenant in it, the person’s id there, and codes for the receiver.

object
codes

Codes the receiver reads with the punch ({"cost_center": "410"}), kept as given.

object
key
additional properties
string
person_id

The person’s id in that system. Only a person’s own route names one; on a default route it is the person’s external id in the system, when they have one.

string | null
system
required

The receiving system, as a sink names the system it speaks for: 1 to 64 letters, digits, ‘-’ or ‘_’.

string
tenant
required

The tenant in that system the punches go to: its id there, opaque.

string
data
required

The punch as its package reported it.

object
device
required

The device that took it.

string
endpoint
required

The endpoint’s id within the tenant.

string
id
required

The punch’s id (its event’s): the same once it is routed.

string
reason
required

Why it is unrouted: no_route, unknown_person, ambiguous, policy, policy_failed or deciding.

string
Allowed values: no_route ambiguous policy policy_failed unknown_person deciding
received_at
required

When Connect received it.

string format: date-time
user_id
required

The person’s user id.

string
Example
[
{
"candidates": [
{
"codes": {
"work_code": "7"
},
"person_id": "11",
"system": "attendance",
"tenant": "agency-a"
},
{
"codes": {
"work_code": "8"
},
"person_id": "22",
"system": "attendance",
"tenant": "agency-b"
}
],
"data": {
"state_name": "check_in",
"time": "2026-10-07T08:00:00-05:00",
"user_id": "1001"
},
"device": "T1",
"endpoint": "town",
"id": "0f3c2a9b8d7e6f5a4b3c2d1e0f9a8b7c",
"reason": "policy",
"received_at": "2026-10-07T08:00:05Z",
"user_id": "1001"
}
]

A login is configured and the request carries neither it nor an API token, or it carries a wrong login (WWW-Authenticate: Basic realm="Hour Advantage", no body). Or the request carries an API token that is not one (revoked, or never made), login or not (WWW-Authenticate: Bearer realm="Hour Advantage", error="invalid_token", the body the API token was refused).

Media typetext/plain
string
Example
the API token was refused
WWW-Authenticate
string

The scheme to answer with: Basic realm="Hour Advantage", or for a refused token Bearer realm="Hour Advantage", error="invalid_token".

The Host header does not name a loopback address while one is required (no login configured, or the API listens on loopback), or the Origin header does not match the Host: {"error": ...} says which. Or no login is configured and the request carries Forwarded, X-Forwarded-For or X-Real-IP (a proxy forwarded it): the plain text body says so. Or an API token asks for a route its scope does not reach: the plain text body says so.

A refusal, and why.

object
error
required

Why the request was refused, in a sentence.

string
fields

For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.

Array<object>

What is wrong with one field of a request.

object
field
required

The parameter, as the request names it (values.volume for a setting inside values).

string
message
required

What is wrong with it.

string
request_id

The request’s id, as its X-Request-Id header gives it: what to quote when asking what happened to it.

string | null
Example
{
"error": "the Host must name this machine (localhost or a loopback address); an API reached by other names needs the admin login"
}

No sync group has that id.

Media typeapplication/json

A refusal, and why.

object
error
required

Why the request was refused, in a sentence.

string
fields

For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.

Array<object>

What is wrong with one field of a request.

object
field
required

The parameter, as the request names it (values.volume for a setting inside values).

string
message
required

What is wrong with it.

string
request_id

The request’s id, as its X-Request-Id header gives it: what to quote when asking what happened to it.

string | null
Example
{
"error": "unknown sync group 'hq'"
}

More than 2 admin logins are being checked at once: send the request again after the Retry-After seconds. A request carrying the login that checked out last, or an API token, is not held up.

Media typetext/plain
string
Example
too many logins at once; try again
Retry-After
integer

Seconds to wait: 1.

Something went wrong in the gateway that asking again will not put right by itself; error says what.

Media typeapplication/json

A refusal, and why.

object
error
required

Why the request was refused, in a sentence.

string
fields

For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.

Array<object>

What is wrong with one field of a request.

object
field
required

The parameter, as the request names it (values.volume for a setting inside values).

string
message
required

What is wrong with it.

string
request_id

The request’s id, as its X-Request-Id header gives it: what to quote when asking what happened to it.

string | null
Example
{
"error": "db error: ERROR: permission denied for table settings"
}

The database cannot be used right now (not reachable, too busy, no connection free in time), or the instance is still starting: send the same request again shortly. An API token that cannot be checked for the same reason is answered 503 in plain text (the API token cannot be checked right now; try again shortly).

Media typeapplication/json

A refusal, and why.

object
error
required

Why the request was refused, in a sentence.

string
fields

For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.

Array<object>

What is wrong with one field of a request.

object
field
required

The parameter, as the request names it (values.volume for a setting inside values).

string
message
required

What is wrong with it.

string
request_id

The request’s id, as its X-Request-Id header gives it: what to quote when asking what happened to it.

string | null
Example
{
"error": "the gateway is starting; try again shortly"
}