-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Current Situation
A timeLimit passcode appears in keyList, but its validity window is missing.
This means the API consumer can know:
- that it is a temporary passcode
- that it exists
- whether it is currently
normalorexpired
But cannot know:
- the actual start time
- the actual end time
Description
For keypad devices, keyList returns passcode metadata such as:
idnametypepasswordivstatuscreateTime
However, when the passcode type is timeLimit, the API does not return the actual validity range (startTime / endTime).
This is a major limitation for any admin panel, PMS integration, or third-party tool that needs to display the real validity period of temporary passcodes.
Why this is a problem
When a passcode is of type timeLimit, the most important information is:
- when it starts being valid
- when it stops being valid
But keyList currently does not expose that information.
As a result:
- the official SwitchBot app can display the correct validity period
- third-party integrations using OpenAPI cannot display the same information
- integrations are forced to store local copies of the requested time range
- this becomes unreliable when passcodes can be created by multiple systems
- for example: SwitchBot app, PMS, custom admin panel, etc.
- it can also cause incorrect UI behavior if passcode IDs are reused
Proposed Change
Please expose startTime and endTime in keyList for passcodes of type timeLimit.
If applicable, it may also make sense to expose the same fields for other time-based passcode types such as disposable.
This would make the OpenAPI much more useful for:
- lock admin panels
- PMS integrations
- property management workflows
- audit and support tools
Expected behavior
For passcodes where:
type = timeLimit
the keyList item should also include:
startTimeendTime
Preferably in the same millisecond timestamp format already used elsewhere in the API.
Example:
{
"id": 11,
"name": "Guest A",
"type": "timeLimit",
"password": "...",
"iv": "...",
"status": "normal",
"createTime": 1773676800000,
"startTime": 1773988800000,
"endTime": 1774245600000
}
Additional Context
No response