To grant a person access, we recommend Access Grants—Seam’s high-level, device-agnostic way to give someone access. An Access Grant creates the correct dormakaba Oracode access code for you and manages its lifecycle. This page covers the lower-level Access Codes API and the dormakaba Oracode-specific requirements that apply whichever API you use.
Online vs. Offline Access Codes
Each dormakaba Oracode door programs either online or offline access codes, never both. Seam detects each door’s connectivity automatically and reports it through the device’s capabilities:- Gateway-connected doors program online access codes (
device.can_program_online_access_codesistrue). - Standalone doors program offline access codes (
device.can_program_offline_access_codesistrue). Offline codes are enabled by a server-based registry of synchronized encryption keys (tokens) that the manufacturer maintains, so they work without the lock being online.
is_offline_access_code to true; for an online code, omit it.
Check Device Time Constraints
dormakaba Oracode locks do not accept arbitrary check-in and check-out times. Each door is configured with a fixed set of time slots (also called “user levels”), and every access code’s times must match one of them. Read the device’s time constraints before you create a code so that the times you request are valid—rather than discovering the constraint from an error or a warning. Seam exposes these constraints in a device-agnostic form ondevice.properties:
device.properties.offline_time_frame_options— for offline doors.device.properties.online_time_frame_options— for online doors.
time_pairs, min_duration, max_duration, time_zone, and how to choose among them—see Understanding Time Frame Options.
Read these options from the device at request time and build your time frame from the values you find—do not hardcode limits. A door’s time slots can change when the installer reconfigures them.
offline_time_frame_options:
max_duration and set your check-in and check-out to one of the time_pairs, interpreted in the option’s time_zone.
Brand-Specific Time Slot Data
The raw dormakaba Oracode user levels are also available ondevice.properties.dormakaba_oracode_metadata.predefined_time_slots, along with the lock’s iana_timezone. The device-agnostic time_frame_options above are derived from this data and are the recommended source of truth; the raw slots are useful when you need dormakaba-specific fields such as is_biweekly_mode or the user-level prefix.
When a Request Violates the Constraints
If the time frame you request does not fit any of the door’s time slots, Seam tells you in a way that depends on which API you use:- Access Grants: the grant is created with a
device_time_constraints_violatedwarning. Itsreasonis one ofduration_exceeds_max,times_do_not_match_slots, orongoing_not_supported. Inspect the grant’swarningsand adjust the times. - Access Codes API: the create request fails with an error indicating that the times do not match an available time slot.
dormakaba Oracode Requirements
Note the following dormakaba Oracode-specific restrictions, which apply to both Access Grants and the Access Codes API:- You cannot specify the PIN. dormakaba Oracode auto-generates a six-digit code (the
cannot_specify_pin_codecode constraint), which Seam returns. Passing acodeargument returns an error. - Duration limit. An offline access code can be valid for a maximum of 31 consecutive days.
- Codes cannot be updated or deleted. Because offline codes cannot be removed, be mindful of device- and installation-specific code limits, especially when creating many codes at once. See your lock’s user manual or contact dormakaba Oracode support for these limits.
- Times are in the lock’s local time zone. Set
starts_atandends_atusing a time and offset that match the lock’s local time zone, which you specify when you connect the site to Seam. You can view it indevice.properties.dormakaba_oracode_metadata.iana_timezone. - Master and one-time-use codes are not currently supported.
Create an Access Code
You can create hourly- and daily-bound offline access codes on standalone doors, and online access codes on gateway-connected doors. After you create a code, poll or use a webhook to confirm that it was registered successfully.Create an Hourly-Bound Code
Provide thedevice_id, and specify starts_at and ends_at ISO 8601 timestamps that match one of the device’s time slots. For an offline door, set is_offline_access_code to true. You can also assign an optional name.
Set the
starts_at and ends_at times and offsets to match the lock’s local time zone.Create a Daily-Bound Code
Daily-bound codes give you day-level granularity. Specify the same time (but different dates) instarts_at and ends_at. Because these codes require day-level duration granularity, set max_time_rounding to 1day (or 1d) so that Seam can round to a full day to match an available slot. Seam returns an error if max_time_rounding is 1hour but the necessary rounding exceeds one hour.
The request is otherwise identical to the hourly-bound example above. The changed parameters:
Verify That the Code Is Set
A time-bound code moves through distinct lifecycle phases:unset— Created on Seam but not yet on the lock, because its activation time is in the future.setting— Asstarts_atapproaches, Seam registers the code with the dormakaba Oracode server.set— The code is programmed and ready to grant access.
- Polling — Query the access code until its
statusupdates. See Polling Method. - Webhook — Subscribe to the
access_code.set_on_deviceandaccess_code.scheduled_on_deviceevents. See Webhook Events Method.
Troubleshooting
“No time slots found” / times do not match a slot. Your requested times are not within one hour of any configured slot. Retrieve the device’s time frame options to see what is available, then either adjust your times or ask your dormakaba installer to add a matching slot. Behavior differs across doors. Time slots are configured per door, so retrieve the time frame options for each device individually rather than assuming they are the same. Code creation fails for automated bookings. Confirm that time slots are configured for the door, that your booking times fall within one hour of a slot, and that the device supports the code type you are creating (can_program_offline_access_codes or can_program_online_access_codes).
For time slot configuration help, contact your dormakaba installer. For Seam API questions, email support@getseam.com.