person.enrolled
Sent by the gateway for a sync group that keeps people: a person was enrolled at a clock (the clock reported a user the group did not have). They are the group’s person from then on, with what the clock reported (never their keypad PIN or password), kept on that clock alone until they are linked (given an id in another system: an external id, or a route of their own with one), when they are sent to every clock of the group as placement says. They count toward the tenant’s limit on people. The endpoint’s policy package’s enrolled hook is called after it is stored; a system deciding elsewhere links or deletes them through the API. Told once per enrollment. The envelope has endpoint “sync:
Schema id: urn:houradvantage:events:3:person.enrolled
Fields
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | The person’s user id: their id on the clock. |
person | string or null | yes | Connect’s own id of the person, as events about them carry it as person. |
version | integer | yes | The version the enrollment wrote. at least 1 |
endpoint | string | yes | The id, within the tenant, of the endpoint of the clock they were enrolled at. |
device | string | yes | The id of the clock they were enrolled at. |
fields | object | yes | The person’s fields as the clock reported them (name, role, cards, …), with enrolled: ” |
Example
{ "user_id": "1002", "person": "9b7c0a52-5f3e-4d0e-9a51-0c2f6d1e8a11", "version": 17, "endpoint": "office", "device": "CG0001", "fields": { "name": "Bo", "role": "user", "enrolled": "office/CG0001" }}JSON Schema
person.enrolled.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:person.enrolled", "title": "person.enrolled: data", "description": "Sent by the gateway for a sync group that keeps people: a person was enrolled at a clock (the clock reported a user the group did not have). They are the group's person from then on, with what the clock reported (never their keypad PIN or password), kept on that clock alone until they are linked (given an id in another system: an external id, or a route of their own with one), when they are sent to every clock of the group as placement says. They count toward the tenant's limit on people. The endpoint's policy package's enrolled hook is called after it is stored; a system deciding elsewhere links or deletes them through the API. Told once per enrollment. The envelope has endpoint \"sync:<group>\", device \"\" and package \"houradvantage-connect\"; the event goes to the sinks the group names.", "type": "object", "properties": { "user_id": { "type": "string", "description": "The person's user id: their id on the clock." }, "person": { "type": [ "string", "null" ], "description": "Connect's own id of the person, as events about them carry it as person." }, "version": { "type": "integer", "minimum": 1, "description": "The version the enrollment wrote." }, "endpoint": { "type": "string", "description": "The id, within the tenant, of the endpoint of the clock they were enrolled at." }, "device": { "type": "string", "description": "The id of the clock they were enrolled at." }, "fields": { "type": "object", "description": "The person's fields as the clock reported them (name, role, cards, ...), with enrolled: \"<endpoint>/<device>\"." } }, "required": [ "user_id", "person", "version", "endpoint", "device", "fields" ], "examples": [ { "user_id": "1002", "person": "9b7c0a52-5f3e-4d0e-9a51-0c2f6d1e8a11", "version": 17, "endpoint": "office", "device": "CG0001", "fields": { "name": "Bo", "role": "user", "enrolled": "office/CG0001" } } ]}