Webhooks
Reading access events
This guide is for integrations that want to know who was let in or turned away at a door, for example to show access history in a customer portal or to react to refused attempts. sedisto reports each access decision as a webhook, and you can read any delivered event again through the REST API.
Before you start
Section titled “Before you start”- A webhook endpoint subscribed to
access.grantedandaccess.denied, see Managing webhook endpoints via the API and Receiving webhooks. - For reading events back, the token needs
events:read, plus the read permission of every record kind you want included.
Receive access decisions
Section titled “Receive access decisions”-
Subscribe your endpoint to
access.grantedandaccess.denied. To limit the stream, add a subscription filter by site, entrance or unit. -
In your receiver, read
dataof each delivery:{ "entrance_id": "…", "unit_id": "…", "account_id": "…", "tenant_id": "…","interaction_request_id": "…" }
access.* is the decision at the door, from whichever channel made it: an opening request approved by sedisto, for example from the app or through the API, a PIN entered at a door keypad, an identification attribute presented at a reader, a licence plate recognised at the site, or a PIN typed at a tablet. All arrive as the same two types.
Four fields can be empty, and your receiver must handle that:
account_idis empty when the decision knew no person, for example a PIN that matches no account.interaction_request_idis empty for decisions made at the door itself. It is set when sedisto orchestrated the opening, see Opening a door.unit_idis empty for a tablet decision refused before an entrance was known.tenant_idis always empty for a tablet decision.
The decision and its execution are separate events. An opening through sedisto produces access.granted and, as the hardware reports back, interaction_request.*. They can arrive in either order.
Read an event again
Section titled “Read an event again”GET /events/{id} returns a delivered event, where {id} is the id from the body. The answer is the envelope exactly as it was delivered. There is no listing; events are read by id only.
An id that does not exist, belongs to another installation, belongs to a site your token is restricted from, or has been removed all answer 404. Events that reference an account are removed after the organization’s retention period.
Include the referenced records
Section titled “Include the referenced records”Add include to receive the records the event refers to in the same response, for example GET /events/{id}?include=entrance,unit,tenant. Allowed values are entrance, unit, tenant, account, rental_agreement, interaction_request, site and incident, comma-separated or repeated. There is no include=all; an unknown value answers 400.
The response gains an included block with one entry per requested kind the event refers to:
- The entry is the whole record, as its own endpoint returns it, when your token holds that kind’s read permission, reaches the event’s site, and may see the record.
- Otherwise the entry is the minimal form: the
id, plusexternal_idfor units, tenants and rental agreements.
Records are read as they are now, not as they were when the event happened.