Skip to content

Employers, organizations and locations

A tenant keeps the structure its business rules, lists and approvals need. That structure has three parts. The first is the legal employers its people work for. The second is any number of hierarchies of organizations (cost centers, management, regions, union locals). The third is the work locations people work at. Where each person sits in that structure is part of their employment, and it is dated. So a move next month leaves this month’s timecards as they were.

Tenant acme Employers acme-us, acme-ca legal entities Hierarchies management, cost centers trees of organizations Work locations reno, dallas time zone, jurisdiction Employee record 4471 one employment of one person fixed dated dated
A record's employer never changes. Its organization in each hierarchy and its work location take effect from a day. Business rules read them as they stood on each day worked.

The structure decides three things:

An employer is a legal entity in a tenant: the company its people are employees of. Its ids in other systems go under names you choose. Examples are an EIN in the US, a PAYE reference in the UK, a Business Number in Canada, or a payroll company code. Nothing about an employer is specific to a country.

A tenant is created with one employer, with the tenant’s id and name. So a single company never has to set one up. A group of companies adds one employer for each company.

APIhourctl
ListGET /api/attendance/tenants/{tenant}/employershourctl -t acme attend employers list
CreatePOST .../employershourctl -t acme attend employers create acme-ca --name "Acme Canada" --external-id business_number=123456789RC0001
ReadGET .../employers/{id}hourctl -t acme attend employers show acme-ca
ChangePATCH .../employers/{id}hourctl -t acme attend employers update acme --external-id ein=12-3456789

Each person in a tenant is one employee record. A record is always one employment: one employee of one employer, with one pay calendar and one set of approvals and closes. A record’s employer never changes:

  • A rehire by the same employer is the same record. Employment changes say when the person was hired and terminated.
  • Several jobs at one employer are assignments within the one record (labor context).
  • Moving to another employer ends one employment and starts another. That is a new record with its own id. Setting another employer on an existing record is refused (409).

When the tenant has several employers, create a record with its employer before the person’s first fact. Use PUT .../people/{person}/record with {"employer": "acme-ca"}, or hourctl attend employee set 4471 --employer acme-ca. A person first recorded without one is an employee of the tenant’s first employer. An unlinked person is no one’s employee.

A worker is an optional id that links the records of one human across employers ({"worker": "w-17"}; null removes it; GET .../workers/{worker}, hourctl attend employee worker w-17).

Thresholds such as weekly overtime count within one employment. Each record is calculated on its own. A rule across employers is a business rule you choose. An example is counting the hours for two employers in a joint employment together. The standard threshold step counts the worker’s other records with its others setting (standard steps). The cookbook’s joint employment overtime recipe does this.

When one record’s time changes, the worker’s other records are recalculated from the first workday that changed. A change to a record’s worker recalculates the records of both the old and new worker from today.

Rules on two records can keep changing each other. For example, one follows the other’s pay category and the other takes the opposite. Such rules would never settle. After a few rounds of passing the change back and forth, the engine stops and leaves each record as last calculated. It sends recalculation.parked with "reason": "unsettled", naming the person, the worker and the other records. Anything recorded for one of them starts over.

  • Policy layers apply to an employer’s people with the eligibility rule employer = <id> (eligibility rules).
  • Payroll exports run per employer. An export writes the people of the employer it names, or of the tenant’s only employer. The name goes in "employer": "acme-ca" or hourctl attend export run ... --employer acme-ca. A tenant with several employers must name one, or * for every employer’s people and the unlinked people. Naming none is refused (400) with the list of employers. The export records whose people it wrote (payroll export).

A hierarchy is a named tree of organizations: cost centers, management, regions. A tenant can have as many trees as it needs. Hierarchies cut across employers, so a cost center can hold people of two employers.

An organization has:

  • an id, unique within its hierarchy, and a name;
  • a parent, dated (see moves below);
  • external_ids, its ids in other systems;
  • labels, which selectors pick it by (level=division);
  • metadata, a JSON object of at most 16 KiB. The engine never reads it. Your business rules can.
API (.../hierarchies)hourctl
List, create, rename hierarchiesGET, POST, PATCH .../{hierarchy}hourctl -t acme attend hierarchies list|create|rename
List, create organizationsGET, POST .../{hierarchy}/organizationshourctl -t acme attend orgs management list|create ops-west --parent ops --label level=team
Read, change oneGET, PATCH .../{hierarchy}/organizations/{id}hourctl -t acme attend orgs management show|update ops-west
Move onePOST .../{hierarchy}/organizations/{id}/move with {"parent": "west", "from": "2026-10-12"}hourctl -t acme attend orgs management move ops-west --parent west --from 2026-10-12

A move puts an organization under another parent, or makes it a root, from a given day. Its whole subtree goes with it. Before that day it stays where it was. A move that would make the tree loop on any day is refused (409). So is a parent the hierarchy does not have (400).

A move recalculates two groups from its day. One is everyone ever in the organization or under it. The other is everyone whose assignment names it or an organization under it. A change to an organization’s name, labels or metadata recalculates them from today. This is because business rules can read those.

A work location has:

  • an id and a name;
  • the time zone its days are counted in;
  • a jurisdiction;
  • the labor context values work there takes (values, such as {"country": "fr", "site": "paris"}; --value country=fr);
  • external ids, labels and metadata.

The API path is .../locations. The command is hourctl attend locations list|show|create|update. The jurisdiction is any string you choose (us-ca, uk). The engine knows nothing of any country’s law. Your rules give it meaning.

Where a person is belongs to their employment and is dated like the rest of it. An employment change sets, from its effective day:

  • their organization in each hierarchy ("organizations": {"management": "ops-west"}; null for none in that hierarchy). A person is in at most one organization of each hierarchy on a day.
  • their work location ("location": "reno"; null for none).
Terminal window
hourctl -t acme attend employee place 4471 --from 2026-10-12 \
--org management=ops-west --location reno

A change that names an organization or location the tenant does not have is refused (400). Like any employment change, it recalculates the person from its day.

While a person is at a location, their days are counted in the location’s time zone instead of the zone their setup gives. At no location, the setup’s zone applies again. GET .../people/{person}?day= shows their organization in each hierarchy (orgs) and their location on that day.

A line’s labor context takes each value from the first source that gives it. The sources, in order:

  1. The punches: a value picked at the clock, or a code of the route the punch came by, such as a clock’s site.
  2. The scheduled shift.
  3. The clock the work was punched in on: its record’s values as they were when the punch arrived (see clock records).
  4. The work location the person is at that day (its values).
  5. The assignment.
  6. The person’s and the company’s defaults.

Implications follow each: site = paris can mean country = fr. A line says where it was worked, whichever way that is known. Rates, rules and exports read it there.

The two ways differ in what they decide:

  • A value the punch gives wins for the line: work punched at a Paris clock is Paris work, wherever the person is placed.
  • The day’s zone, its holidays (location_holidays) and the layers whose rule reads location or jurisdiction follow the work location the person is at that day. That is known before any punch, and for days not worked. To record where someone will work ahead (a posting, a week on another site), make it an employment change from its first day.

Business rules read where the person was on each day. They read the person’s organization in each hierarchy: its id, name, labels, external ids, metadata, and the organizations above it as the tree stood that day. They read the person’s location: its id, name, zone, jurisdiction, values, labels, external ids and metadata. That is how rules that differ by place work. Examples are daily overtime where the location’s law has it, or a premium for one division. See the cookbook’s daily overtime by location and site allowance. Writing policy steps shows how your own steps read them.

Add under=<hierarchy>:<org> to GET .../people, .../exceptions, .../pending, .../timecards or .../unlinked to list only those in that organization or one under it. The list uses the tree and memberships as they were on on=YYYY-MM-DD. By default that is today (UTC). For timecards it is the pay period’s last day. The unlinked list filters by the person each unlinked person is linked to.

GET .../timecards?period=2026-10-05 lists each person’s timecard for the pay period starting that day. It shows hours, whether it is approved and closed, where each subject’s approval stands, and the exceptions still open.

Terminal window
hourctl -t acme attend timecards 2026-10-05 --under management:ops-west
hourctl -t acme attend people --under management:ops-west --on 2026-10-07
hourctl -t acme attend exceptions --under management:ops-west

These lists stay fast at the supported scale. That is a page of people under any organization of a million-person tenant, from a small team to the root.

An eligibility rule only decides which layers apply to a person. It is never a way to list people. Lists filter with under=.

A stage of an approval rule can name a place in a hierarchy. A subject waiting at that stage then says which organization the decision waits on (organization, in the ledger’s approvals, the timecards list, a leave request and leave.requested). Your app decides who approves for that organization.

{ "approval_rule": { "side": "pay", "subject": "period", "blocked_by_exceptions": false, "stages": [
{ "name": "supervisor", "approver": "supervisor", "organization": { "hierarchy": "management" } },
{ "name": "director", "approver": "director",
"organization": { "hierarchy": "management", "up": 1, "select": "level = division" } }
] } }
  • up counts upward from the person’s own organization (0), as the tree stood on the subject’s last day (a leave request’s first day).
  • select picks the nearest organization from there upward that the selector matches by its labels (under management:west picks one under west).

For an assignment’s subject (approving by assignment), the count starts from the assignment’s own organization in that hierarchy when the assignment names one. It starts from the person’s when it does not:

{ "assignment": { "id": "P-100", "from": "2026-10-05", "to": null, "defaults": { "client": "northwind" },
"allowed": {}, "organizations": { "clients": "northwind-dallas" } } }

The organizations that assignments name, and those above them, are available alongside the person’s own, whether or not the person is placed in that hierarchy.

A tenant’s written-out document carries its employers, hierarchies, organizations (with their moves) and locations, and each person’s record and worker. Where people are is in their employment facts.