- JavaScript
- cURL
- Python
- Ruby
- PHP
- C#
Request:Response:
Supported Code Lengths
This property is denoted assupported_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 propertymax_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
Thecode_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:
constraint_type property can be one of the following:
| Constraint Type | Description |
|---|---|
no_zeros | 0s cannot be used as digits in the pin code. |
cannot_start_with_12 | The pin code cannot start with the sequence of digits 12. |
no_triple_consecutive_ints | No more than 3 digits in a row can be consecutive or the same in the pin code. |
cannot_specify_pin_code | A pin code cannot be specified - it has to be left empty and one will be generated by the lock provider. |
pin_code_matches_existing_set | If a pin code is specified, it must match an existing set of pin codes used in the account (for example, pin code matches the code assigned to a user in the system). |
start_date_in_future | For time-bound codes, the start date has to be in the future. |
no_ascending_or_descending_sequence | The PIN code cannot be a purely ascending (for example, 1234) or descending (for example, 9876) sequence. |
at_least_three_unique_digits | The PIN code must contain at least three distinct digits (for example, 1122 is invalid; 1123 is valid). |
no_all_same_digits | The PIN code cannot consist entirely of the same repeated digit (for example, 1111 is invalid). |
unique_first_four_digits | The first four digits of the PIN code must all be distinct. |
cannot_contain_089 | The PIN code cannot contain any of the digits 0, 8, or 9. |
cannot_contain_0789 | The PIN code cannot contain any of the digits 0, 7, 8, or 9. Only digits 1–6 are permitted. This constraint applies to TTLock cylinder devices whose physical keypad only includes buttons numbered 1 through 6. |
name_length | The name of the code has some restrictions on length. When the constraint_type is name_length, the constraint object has one or two additional properties called min_length and max_length to specify the length constraints. |
name_must_be_unique | The name of the access code must be unique across all codes on the device. |
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 thecannot_contain_0789 constraint to the device.
If you check device.properties.code_constraints for one of these devices, you will see:
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.
