Skip to content

clock.shifted

Time and Attendance: sent when an operator shifts a clock’s punches (POST …/clocks/{id}/shift): the clock’s punches made from an instant up to another were each moved by a number of seconds (or, for a request that takes one back, put back to the instant they were made), each by a correction saying who and why, and those persons are worked out again from the punch’s workday. A shift that finds nothing to move sends nothing. It is kept in Time and Attendance’s own event log and delivered to its sinks, the envelope’s endpoint “attendance”, its package “houradvantage-attend” and its device the tenant’s id.

Schema id: urn:houradvantage:events:3:clock.shifted

Fields

FieldTypeRequiredDescription
clockstringyesThe clock’s device id.
fromstring (date-time)yesThe first instant of the range: punches made at or after it, as the clock reported them.
tostring (date-time)yesThe end of the range: punches made before it.
by_secondsintegerHow far each punch was moved, in seconds: later if positive. Absent for a request that took a shift back.
undostringThe id of the shift this request took back. Absent for a shift.
punchesintegeryesHow many punches were moved. at least 1
peopleintegeryesHow many persons they are kept under. at least 1
bystringyesWho asked, as the server saw it (user:, token:).
reasonstringyesWhy: what the operator said, or the default.
idstringyesThe request’s id: part of each of its corrections’ ids (shift--, or unshift-- for one that took a shift back), and what a later request gives as undo.
completebooleanyesFalse when one run’s most (20000 punches) was reached: asking again with the same id does the rest, and sends another event.

Example

{
"clock": "Z34ACMEN00118",
"from": "2026-03-09T00:00:00Z",
"to": "2026-03-14T00:00:00Z",
"by_seconds": 3600,
"punches": 331,
"people": 41,
"by": "user:ann",
"reason": "the clock kept standard time",
"id": "dst-spring",
"complete": true
}

JSON Schema

clock.shifted.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:houradvantage:events:3:clock.shifted",
"title": "clock.shifted: data",
"description": "Time and Attendance: sent when an operator shifts a clock's punches (POST .../clocks/{id}/shift): the clock's punches made from an instant up to another were each moved by a number of seconds (or, for a request that takes one back, put back to the instant they were made), each by a correction saying who and why, and those persons are worked out again from the punch's workday. A shift that finds nothing to move sends nothing. It is kept in Time and Attendance's own event log and delivered to its sinks, the envelope's endpoint \"attendance\", its package \"houradvantage-attend\" and its device the tenant's id.",
"type": "object",
"properties": {
"clock": {
"type": "string",
"description": "The clock's device id."
},
"from": {
"type": "string",
"format": "date-time",
"description": "The first instant of the range: punches made at or after it, as the clock reported them."
},
"to": {
"type": "string",
"format": "date-time",
"description": "The end of the range: punches made before it."
},
"by_seconds": {
"type": "integer",
"description": "How far each punch was moved, in seconds: later if positive. Absent for a request that took a shift back."
},
"undo": {
"type": "string",
"description": "The id of the shift this request took back. Absent for a shift."
},
"punches": {
"type": "integer",
"minimum": 1,
"description": "How many punches were moved."
},
"people": {
"type": "integer",
"minimum": 1,
"description": "How many persons they are kept under."
},
"by": {
"type": "string",
"description": "Who asked, as the server saw it (user:<name>, token:<name>)."
},
"reason": {
"type": "string",
"description": "Why: what the operator said, or the default."
},
"id": {
"type": "string",
"description": "The request's id: part of each of its corrections' ids (shift-<id>-<punch>, or unshift-<id>-<punch> for one that took a shift back), and what a later request gives as undo."
},
"complete": {
"type": "boolean",
"description": "False when one run's most (20000 punches) was reached: asking again with the same id does the rest, and sends another event."
}
},
"required": [
"clock",
"from",
"to",
"punches",
"people",
"by",
"reason",
"id",
"complete"
],
"examples": [
{
"clock": "Z34ACMEN00118",
"from": "2026-03-09T00:00:00Z",
"to": "2026-03-14T00:00:00Z",
"by_seconds": 3600,
"punches": 331,
"people": 41,
"by": "user:ann",
"reason": "the clock kept standard time",
"id": "dst-spring",
"complete": true
}
]
}