timecard.approved
A person’s timecard for a pay period is approved at every stage its approval rule has: as a whole, or, where its side is approved by assignment, every assignment’s hours of it. Sent once; a change that takes the approval away (the timecard changed after it was approved) and a new approval send it again, with the totals as they are then. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device ”
Schema id: urn:houradvantage:events:3:timecard.approved
Fields
| Field | Type | Required | Description |
|---|---|---|---|
tenant | string | yes | The tenant it is about. |
person | string | yes | The person’s id in the attendance engine (an employee’s id, or an unlinked person’s, ” |
side | string | yes | Which side the timecard is: “pay” (what the person is paid), or a bill side the tenant keeps (what a customer is billed). |
first | string (date) | yes | The pay period’s first day, YYYY-MM-DD. |
last | string (date) | yes | The pay period’s last day, YYYY-MM-DD. |
totals | object | yes | The timecard’s totals. |
totals.paid | string | yes | The hours of its lines in paid categories, in decimal hours as the tenant keeps them (“40.25”): carried forward, never rounded line by line. Time in a category that is not paid is not in it. pattern ^-?\d+(\.\d+)?$ |
totals.worked | string | yes | The time worked, as a duration: hours and minutes (“40h 15m”), “0s” for none. |
totals.categories | object | yes | Hours by pay category (work, overtime, holiday… as the tenant names them), in decimal hours. |
totals.category_use | object | yes | What each pay category in categories is, by name: whether its time is paid and whether it counts as worked, and the code payroll knows it by where the tenant’s setup names one. Time in a category that is not paid (a meal deducted, say) is recorded but not in paid. |
because | array of object | What marked the person for this recalculation, as the store knew it, in the order made: a setup item put (kind “setup”, its item kind and id, when it was stored, by whom and reason) a correction made (kind “correction”, its id), punches that arrived (kind “punches”: one, however many, with no id), or an operator asking for the person to be worked out again keeping nothing (kind “redo”, by whom and reason). Absent where nothing is known of what it was (a load, a policy, a punch). | |
because[].kind | "setup" \ | "correction" \ | "punches" \ |
because[].id | string | ||
because[].item | string | For setup, the kind of the item (holiday, rate…). | |
because[].stored | string (date-time) | ||
because[].by | string | ||
because[].reason | string |
Example
{ "tenant": "acme", "person": "4471", "side": "pay", "first": "2026-10-05", "last": "2026-10-11", "totals": { "paid": "42.50", "worked": "42h 30m", "categories": { "overtime": "2.50", "work": "40.00" }, "category_use": { "overtime": { "paid": true, "worked": true }, "work": { "paid": true, "worked": true } } }}JSON Schema
timecard.approved.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:timecard.approved", "title": "timecard.approved: data", "description": "A person's timecard for a pay period is approved at every stage its approval rule has: as a whole, or, where its side is approved by assignment, every assignment's hours of it. Sent once; a change that takes the approval away (the timecard changed after it was approved) and a new approval send it again, with the totals as they are then. Kept in Time and Attendance's own event log (apart from Connect's) and delivered to its sinks: the tenant's (/api/attendance/tenants/{tenant}/sinks) and the install's (/api/attendance/sinks). The envelope's endpoint is \"attendance\", its package \"houradvantage-attend\", and its device \"<person>/<side>/<first>\" (the timecard). The same event sent again has the same id.", "type": "object", "properties": { "tenant": { "type": "string", "description": "The tenant it is about." }, "person": { "type": "string", "description": "The person's id in the attendance engine (an employee's id, or an unlinked person's, \"<group>~<person>\")." }, "side": { "type": "string", "description": "Which side the timecard is: \"pay\" (what the person is paid), or a bill side the tenant keeps (what a customer is billed)." }, "first": { "type": "string", "format": "date", "description": "The pay period's first day, YYYY-MM-DD." }, "last": { "type": "string", "format": "date", "description": "The pay period's last day, YYYY-MM-DD." }, "totals": { "type": "object", "description": "The timecard's totals.", "properties": { "paid": { "type": "string", "description": "The hours of its lines in paid categories, in decimal hours as the tenant keeps them (\"40.25\"): carried forward, never rounded line by line. Time in a category that is not paid is not in it.", "pattern": "^-?\\d+(\\.\\d+)?$" }, "worked": { "type": "string", "description": "The time worked, as a duration: hours and minutes (\"40h 15m\"), \"0s\" for none." }, "categories": { "type": "object", "description": "Hours by pay category (work, overtime, holiday... as the tenant names them), in decimal hours.", "additionalProperties": { "type": "string", "pattern": "^-?\\d+(\\.\\d+)?$" } }, "category_use": { "type": "object", "description": "What each pay category in `categories` is, by name: whether its time is paid and whether it counts as worked, and the code payroll knows it by where the tenant's setup names one. Time in a category that is not paid (a meal deducted, say) is recorded but not in `paid`.", "additionalProperties": { "type": "object", "properties": { "paid": { "type": "boolean", "description": "Its time is paid." }, "worked": { "type": "boolean", "description": "Its time counts as worked." }, "code": { "type": "string", "description": "The code payroll knows it by." } }, "required": [ "paid", "worked" ] } } }, "required": [ "paid", "worked", "categories", "category_use" ] }, "because": { "type": "array", "description": "What marked the person for this recalculation, as the store knew it, in the order made: a setup item put (`kind` \"setup\", its `item` kind and `id`, when it was `stored`, `by` whom and `reason`) a correction made (`kind` \"correction\", its `id`), punches that arrived (`kind` \"punches\": one, however many, with no id), or an operator asking for the person to be worked out again keeping nothing (`kind` \"redo\", `by` whom and `reason`). Absent where nothing is known of what it was (a load, a policy, a punch).", "items": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "setup", "correction", "punches", "redo" ] }, "id": { "type": "string" }, "item": { "type": "string", "description": "For setup, the kind of the item (holiday, rate...)." }, "stored": { "type": "string", "format": "date-time" }, "by": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "kind" ] } } }, "required": [ "tenant", "person", "side", "first", "last", "totals" ], "examples": [ { "tenant": "acme", "person": "4471", "side": "pay", "first": "2026-10-05", "last": "2026-10-11", "totals": { "paid": "42.50", "worked": "42h 30m", "categories": { "overtime": "2.50", "work": "40.00" }, "category_use": { "overtime": { "paid": true, "worked": true }, "work": { "paid": true, "worked": true } } } } ]}