Skip to content

work_code

A work code the device holds: one of the codes a user can enter with a punch (punch’s work_code). Emitted by zk-push 2.4, one per code, when the clock uploads its work codes in answer to query_work_codes.

Schema id: urn:houradvantage:events:3:work_code

Fields

FieldTypeRequiredDescription
codestringyesThe code, as the user enters it; "" when the device sent none.
namestringyesThe code’s name; "" when it has none.

Example

{
"code": "7",
"name": "Overtime"
}

JSON Schema

work_code.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:houradvantage:events:3:work_code",
"title": "work_code: data",
"description": "A work code the device holds: one of the codes a user can enter with a punch (punch's work_code). Emitted by zk-push 2.4, one per code, when the clock uploads its work codes in answer to query_work_codes.",
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The code, as the user enters it; \"\" when the device sent none."
},
"name": {
"type": "string",
"description": "The code's name; \"\" when it has none."
}
},
"required": [
"code",
"name"
],
"examples": [
{
"code": "7",
"name": "Overtime"
}
]
}