Skip to main content
Some models of door locks have specific requirements and constraints when it comes to setting PIN codes. It’s essential to be aware of these to ensure seamless functionality and security. The requirements can be fetched by making a Get Device or List Devices (or List Locks) request. Sample set of access code requirements:
Request:
Response:

Supported Code Lengths

This property is denoted as supported_code_lengths and contains an array of numbers. These numbers represent the various lengths (in terms of digits) allowed for a PIN code. For example, if the array contains [4, 6], it means the door lock can accept 4-digit or 6-digit PIN codes. Example Payload:

Maximum Set Codes

The property max_active_codes_supported indicates the total number of codes that can be simultaneously set on a door lock. For the door locks that accommodate native scheduling, this count will includes future scheduled codes that are set on the lock. Example Payload:

PIN Code Constraints

The code_constraints property gives insight into various conditions or limitations that apply to PIN codes. Each constraint in the code_constraints array is an object with at least the constraint_type property. Example Payload:
The constraint_type property can be one of the following:

TTLock Devices with Limited Keypads

Some TTLock devices—particularly certain cylinder lock models—have a physical keypad with buttons numbered 1 through 6 only (no 0, 7, 8, or 9 keys). When Seam detects this hardware configuration, it automatically applies the cannot_contain_0789 constraint to the device. If you check device.properties.code_constraints for one of these devices, you will see:
When generating access codes for these devices, Seam automatically ensures that only digits 1–6 are used. If you attempt to set a code that contains a digit outside this range (for example, 9821), the request will be rejected with a descriptive error message indicating which digits are not supported. Seam detects this constraint automatically from the device’s reported hardware capabilities—no manual configuration is required.