Skip to content

photo

A photo the device took when someone tried to punch, uploaded by the device (zk-push 2.0, 2.4 and 3.4: the ATTPHOTO table). It is personal data: the gateway drops it before it is stored unless the endpoint sets biometrics = true.

Schema id: urn:houradvantage:events:3:photo

Fields

FieldTypeRequiredDescription
user_idstringThe user’s id on the device, read from the photo’s name. Absent when verification failed: the photo then has no user.
verifiedbooleanyesTrue when verification succeeded, so the photo has a user_id; false when it failed.
photo_idstringyesThe photo’s name on the device. zk-push: the time taken as YYYYMMDDHHMMSS, then ”-” and the user’s id for a verified punch (zk-push 2.4 adds “.jpg”).
jpeg_base64stringyesThe JPEG image, base64.

Examples

{
"user_id": "1001",
"verified": true,
"photo_id": "20260115080000-1001",
"jpeg_base64": "/9j/4AAQSkZJRg=="
}
{
"verified": false,
"photo_id": "20260115080412",
"jpeg_base64": "/9j/4AAQSkZJRg=="
}

JSON Schema

photo.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:houradvantage:events:3:photo",
"title": "photo: data",
"description": "A photo the device took when someone tried to punch, uploaded by the device (zk-push 2.0, 2.4 and 3.4: the ATTPHOTO table). It is personal data: the gateway drops it before it is stored unless the endpoint sets biometrics = true.",
"type": "object",
"properties": {
"user_id": {
"type": "string",
"description": "The user's id on the device, read from the photo's name. Absent when verification failed: the photo then has no user."
},
"verified": {
"type": "boolean",
"description": "True when verification succeeded, so the photo has a user_id; false when it failed."
},
"photo_id": {
"type": "string",
"description": "The photo's name on the device. zk-push: the time taken as YYYYMMDDHHMMSS, then \"-\" and the user's id for a verified punch (zk-push 2.4 adds \".jpg\")."
},
"jpeg_base64": {
"type": "string",
"description": "The JPEG image, base64."
}
},
"required": [
"verified",
"photo_id",
"jpeg_base64"
],
"examples": [
{
"user_id": "1001",
"verified": true,
"photo_id": "20260115080000-1001",
"jpeg_base64": "/9j/4AAQSkZJRg=="
},
{
"verified": false,
"photo_id": "20260115080412",
"jpeg_base64": "/9j/4AAQSkZJRg=="
}
]
}