Skip to content

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.

  1. Subscribe your endpoint to access.granted and access.denied. To limit the stream, add a subscription filter by site, entrance or unit.

  2. In your receiver, read data of 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_id is empty when the decision knew no person, for example a PIN that matches no account.
  • interaction_request_id is empty for decisions made at the door itself. It is set when sedisto orchestrated the opening, see Opening a door.
  • unit_id is empty for a tablet decision refused before an entrance was known.
  • tenant_id is 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.

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.

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, plus external_id for units, tenants and rental agreements.

Records are read as they are now, not as they were when the event happened.