Skip to content

Read people's days

GET
/api/attendance/tenants/{tenant}/days
curl --request GET \
--url 'http://127.0.0.1:9090/api/attendance/tenants/example/days?from=2026-10-01&to=2026-10-31&side=pay&detail=totals&under=management%3Aops-west&on=2026-10-31&limit=100' \
--header 'Authorization: Basic <credentials>' \
--header 'X-Request-Id: 4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'

Each person’s days from from through to (at most 366 days), as a person’s days read has them, a page of people at a time, by person: everyone with facts, or with under those in that organization or one under it on on (to without it). With detail=totals, each person’s totals and pay periods only, without the days. A person who cannot be read (no zone set up) says why in error, and the others are read.

tenant
required
string

The tenant’s id.

from
required
string

The first day: YYYY-MM-DD; at most 366 days in all.

Example
2026-10-01
to
required
string

The last day: YYYY-MM-DD, on or after from.

Example
2026-10-31
side
string

Pay (the default) or a bill side.

Example
pay
detail
string

Days (the default): each person’s days, totals and periods; totals: their totals and periods only.

Example
totals
under
string

Only those in this organization, or one under it: hierarchy:organization.

Example
management:ops-west
on
string

The day under is asked of: YYYY-MM-DD; to without it.

Example
2026-10-31
after
string

Carry on after this person: the previous page’s next.

limit
integer

At most this many people: 100 unless given, at most 100.

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

A page of them.

Media typeapplication/json

A page of people’s days.

object
from
required
string
next

Pass as after for the next page; null: there is none.

string | null
people
required

Each person’s, by person.

Array<object>

One person’s days.

object
days

Each day from from through to; absent where only totals are asked for.

Array<object> | null

One day.

object
date
required
string
exceptions
required

The exceptions about it, each as the ledger keeps it: kind, at, about, detail, and how it was followed up.

Array<object>
object
holidays
required
Array<object>

A holiday observed on a day.

object
id
required
string
name
required
string
kept
required

Its period’s ledger is kept: false, the day is as scheduled, with no time (it is ahead, or not worked out yet).

boolean
leave
required

The leave asked for on it, with where each request stands.

Array<object>

Leave asked for on a day.

object
category
required
string
request
required

The leave request’s id.

string
state
required

Approved, pending, rejected, refused…

string
time
required
string
lines
required

Its lines, in the order they are paid.

Array<object>

A line: time in a pay category against a labor context.

object
category
required
string
context
required

Its labor context values, by dimension.

object
key
additional properties
string
end
string | null format: date-time
from
required

Where its time came from, as the ledger says it, with every field it carries: {"segment": {"kind": "work", "punch": "p-1182"}} (the punch that started the work), {"entry": {"id": ...}}, {"leave": {"id": ...}}, {"policy": {"step": ...}}…

object
hours
required
string
stamps
required

What each policy step did to it, in order: step, layers, did.

Array<object>
object
start

When its time ran, as paid (after rounding); absent for a line of time with no time of day (a labor entry of hours, leave).

string | null format: date-time
time
required

Its exact time, and its decimal hours.

string
off

Off, leave or holiday, where a schedule override took the day off.

string | null
period
required

The pay period it is in.

object
first
required
string
last
required
string
punches
required

The punches whose workday it is, in the order punched.

Array<object>

A punch as it is taken, after its corrections.

object
corrections
required

The corrections that made it what it is, in order.

Array<string>
original

The punch as it came, where a correction changed it; absent for one as punched or one a correction added.

object | null
punch
required

The punch as taken, with every field it carries: id, at, kind, values, recorded, stored…

object
restamped
One of:
null
quantities
required
Array<object>

A count or money line.

object
category
required
string
context
required
object
key
additional properties
string
from
required

The labor entry it came from, or the step that made it.

string
measure
required
string
quantity
required

In the measure’s unit (money in its currency’s minor units).

integer format: int64
recorded_after_close

Facts about the day stored after its period was closed, where it is: the day above is as the close kept it, so these are not among its punches or in its lines. Each was a late change, taken in the period open when it was stored (stored_workday), as an adjustment line on that day or a late_change_refused exception about it, by the policy’s close.late_changes. Absent where there are none.

Array<object>

A fact stored after the close of the period of the day it is about.

object
fact
required

The punch or correction as it was stored.

object
id
required

The fact’s id.

string
kind
required

punch, or correction.

string
stored
required

When it was stored.

string format: date-time
stored_workday
required

The workday it was stored on, in the policy’s zone: where the open period took it.

string
shifts
required

The shifts scheduled to start in it.

Array<object>

A scheduled shift.

object
end
required
string format: date-time
id
required
string
start
required
string format: date-time
values
required

The labor context its work takes where the punches do not say.

object
key
additional properties
string
totals
required

What some lines come to.

object
categories
required

By pay category, by name.

Array<object>

The time of a pay category.

object
category
required
string
code

The code payroll knows it by, where the setup names one.

string | null
hours
required

Its decimal hours: the sum of its lines’.

string
paid
required

Whether its time is paid. Absent where the category is not known (a total of lines kept before the setup named it): paid.

boolean
time
required

Its exact time.

string
worked
required

Whether its time counts as worked.

boolean
paid
required

The decimal hours of the lines in paid categories.

string
quantities
required

The counts and money, by measure and category.

Array<object>

The sum of a measure’s counts or money in a pay category, in the measure’s unit (money in its currency’s minor units).

object
category
required
string
measure
required
string
quantity
required
integer format: int64
worked
required

The time of the lines in categories that count as worked.

string
zone
required

The time zone its times are in (its IANA name).

string
error

Why they cannot be read (no zone set up for them, a policy step failing); the rest is then empty.

string | null
periods
required

Each pay period holding a day from from through to, the earliest first.

Array

A pay period the days touch.

object
approved
required

Approved at every stage of the period’s approval.

boolean
closed

When it was closed; null: open.

string | null format: date-time
first
required
string
kept
required

A ledger of it is kept; false: it is ahead, or not worked out yet.

boolean
last
required
string
pending
required

The person waits to be worked out again from a day of it or before: what is kept of it is about to change.

boolean
in_range
required

The totals of its days from from through to.

object
categories
required

By pay category, by name.

Array<object>

The time of a pay category.

object
category
required
string
code

The code payroll knows it by, where the setup names one.

string | null
hours
required

Its decimal hours: the sum of its lines’.

string
paid
required

Whether its time is paid. Absent where the category is not known (a total of lines kept before the setup named it): paid.

boolean
time
required

Its exact time.

string
worked
required

Whether its time counts as worked.

boolean
paid
required

The decimal hours of the lines in paid categories.

string
quantities
required

The counts and money, by measure and category.

Array<object>

The sum of a measure’s counts or money in a pay category, in the measure’s unit (money in its currency’s minor units).

object
category
required
string
measure
required
string
quantity
required
integer format: int64
worked
required

The time of the lines in categories that count as worked.

string
totals
One of:
null
person
required
string
totals
required

The totals of every day from from through to.

object
categories
required

By pay category, by name.

Array<object>

The time of a pay category.

object
category
required
string
code

The code payroll knows it by, where the setup names one.

string | null
hours
required

Its decimal hours: the sum of its lines’.

string
paid
required

Whether its time is paid. Absent where the category is not known (a total of lines kept before the setup named it): paid.

boolean
time
required

Its exact time.

string
worked
required

Whether its time counts as worked.

boolean
paid
required

The decimal hours of the lines in paid categories.

string
quantities
required

The counts and money, by measure and category.

Array<object>

The sum of a measure’s counts or money in a pay category, in the measure’s unit (money in its currency’s minor units).

object
category
required
string
measure
required
string
quantity
required
integer format: int64
worked
required

The time of the lines in categories that count as worked.

string
side
required
string
to
required
string
Example
{
"from": "2026-10-05",
"next": null,
"people": [
{
"periods": [
{
"approved": false,
"closed": null,
"first": "2026-10-05",
"in_range": {
"categories": [
{
"category": "work",
"hours": "40.00",
"paid": true,
"time": "40h",
"worked": true
}
],
"paid": "40.00",
"quantities": [],
"worked": "40h"
},
"kept": true,
"last": "2026-10-18",
"pending": false,
"totals": {
"categories": [
{
"category": "work",
"hours": "80.00",
"paid": true,
"time": "80h",
"worked": true
}
],
"paid": "80.00",
"quantities": [],
"worked": "80h"
}
}
],
"person": "104552",
"totals": {
"categories": [
{
"category": "work",
"hours": "40.00",
"paid": true,
"time": "40h",
"worked": true
}
],
"paid": "40.00",
"quantities": [],
"worked": "40h"
}
}
],
"side": "pay",
"to": "2026-10-11"
}

From after to, more than 366 days, a detail that is not days or totals, or an under that is not hierarchy:organization.

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
Examplegenerated
{
"error": "example",
"fields": [
{
"field": "example",
"message": "example"
}
],
"request_id": "example"
}

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 tenant of 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
Examplegenerated
{
"error": "example",
"fields": [
{
"field": "example",
"message": "example"
}
],
"request_id": "example"
}

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 attendance engine does not run here.

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
Examplegenerated
{
"error": "example",
"fields": [
{
"field": "example",
"message": "example"
}
],
"request_id": "example"
}