person.replaced
Sent by the gateway for a sync group, once: a person’s user id change (POST /api/tenants/{tenant}/sync/{name}/people/{user_id}/change-id) is done on every member. Each member that held the person either renamed them, or had them created under the new id, checked, and the old user deleted. It is not sent while a member is still working on the change or has failed it (POST /api/tenants/{tenant}/sync/{name}/people/{user_id}/retry-change-id carries a failed member on). Punches made under the old id still arrive, marked with sync.user_id_alias_of, for as long as the alias is kept (retention_days from the change). The envelope has endpoint “sync:
Schema id: urn:houradvantage:events:3:person.replaced
Fields
| Field | Type | Required | Description |
|---|---|---|---|
old_user_id | string | yes | The user id the person had. |
new_user_id | string | yes | The user id the person has now. |
at | string (date-time) | yes | When the gateway found every member done, RFC 3339 UTC. |
members | array of object | yes | Every member of the group at that moment, and how the change was made on it. |
members[].endpoint | string | yes | The member’s endpoint. |
members[].device | string | yes | The member device’s id. |
members[].method | "rename" \ | "replace" \ | "unsupported" \ |
Example
{ "old_user_id": "1001", "new_user_id": "2001", "at": "2026-01-15T08:00:00Z", "members": [ { "endpoint": "office", "device": "CG0001", "method": "replace" }, { "endpoint": "office", "device": "CG0002", "method": "unsupported" } ]}JSON Schema
person.replaced.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:person.replaced", "title": "person.replaced: data", "description": "Sent by the gateway for a sync group, once: a person's user id change (POST /api/tenants/{tenant}/sync/{name}/people/{user_id}/change-id) is done on every member. Each member that held the person either renamed them, or had them created under the new id, checked, and the old user deleted. It is not sent while a member is still working on the change or has failed it (POST /api/tenants/{tenant}/sync/{name}/people/{user_id}/retry-change-id carries a failed member on). Punches made under the old id still arrive, marked with sync.user_id_alias_of, for as long as the alias is kept (retention_days from the change). The envelope has endpoint \"sync:<group>\", device \"\" and package \"houradvantage-connect\"; the event goes to the sinks the group names.", "type": "object", "properties": { "old_user_id": { "type": "string", "description": "The user id the person had." }, "new_user_id": { "type": "string", "description": "The user id the person has now." }, "at": { "type": "string", "format": "date-time", "description": "When the gateway found every member done, RFC 3339 UTC." }, "members": { "type": "array", "description": "Every member of the group at that moment, and how the change was made on it.", "items": { "type": "object", "description": "One member device.", "properties": { "endpoint": { "type": "string", "description": "The member's endpoint." }, "device": { "type": "string", "description": "The member device's id." }, "method": { "enum": [ "rename", "replace", "unsupported", "not_applicable" ], "description": "rename: the device held the old user and renamed it in one step. replace: the device held the old user; the person was created under the new id and checked on the device, then the old user was deleted and checked gone. unsupported: the device takes people but did not hold the old user; it is sent the person under the new id like any other row. not_applicable: the device takes no people." } }, "required": [ "endpoint", "device", "method" ] } } }, "required": [ "old_user_id", "new_user_id", "at", "members" ], "examples": [ { "old_user_id": "1001", "new_user_id": "2001", "at": "2026-01-15T08:00:00Z", "members": [ { "endpoint": "office", "device": "CG0001", "method": "replace" }, { "endpoint": "office", "device": "CG0002", "method": "unsupported" } ] } ]}