Skip to content

Start

Data model

This article describes the records of the REST API and how they relate. It is for developers who map their own software onto sedisto.

The operator is an organization in sedisto with one installation, which your token and hostname point to. Each physical location is a site: one address, one set of opening hours, one time zone. Almost every record belongs to a site.

A site is divided into levels. Every level exists in the data, even where a small facility has only one of each:

  • Site
    • Area: a part of the site with its own postal address. On an area, state is a province in the address, not a condition.
      • Building
        • Floor: carries a numeric level, so the ground floor is 0 and a basement is negative.
          • Zone: the smallest division, for example one corridor or one row of drive-up units.
            • Unit: a space somebody rents, such as a storage room, a locker, a garage or a parking space.

An entrance is a door, gate, barrier or elevator. It belongs to the site and is attached to an area, a floor, a zone or a single unit. The door of a unit is an entrance attached to that unit; the gates and doors on the way to it are entrances attached to higher levels.

  • A tenant is a renting customer, a person or a company. The word does not mean a tenant in the multi-tenancy sense: every tenant is a customer of the operator.
  • A rental agreement ties a tenant to a unit for a period. Its state (for example active, unpaid or terminated), starts_at and ends_at decide whether the tenant has access, and its access group decides at which times.
  • A tenant membership links a person to a tenant with the role member, manager or owner. It can be tied to one rental agreement, so that one employee of a company gets access to one unit only. Each tenant membership carries a system PIN that sedisto generates.
  • An account is a person. One account can belong to several tenants and hold access at several sites.

sedisto derives access rights from rental agreements and recalculates them every five minutes. A tenant’s access covers the unit door and the entrances on the way to it. You do not create access rights yourself: you create or change the rental agreement, and ending the agreement ends the access.

An interaction request is one attempt to operate an entrance with one of four operations: unlock, lock, open or close. It records who asked, which entrance, and how it ended (requested, in_progress, completed or failed).

The hardware is readable but not writable through the API: locks, lock controllers, gateways, BLE connectors, terminals, elevators and network devices. An incident is one operational problem, such as a lock controller that stopped reporting; it is read only as well.

For how to identify each of these records, see IDs and external IDs.