post https://{base_url}/api/lock_codes
Parameter
Field | Type | Description |
---|---|---|
hub_id/device_id/property_id | Uuid/Uuid/Integer | Either hub's or device's or property's unique ID should be passed |
validity_type | String | Code Validity Type. Allowed values are 'By Day of Week', 'Specific Period','Never Expires', 'Daily Repeating'. |
device_ids optional | Array | Device's unique ID can be sent as for multiple devices as [Uuid1, Uuid2]. |
Note:-
Either hub_id or device_id or property_id or device_ids should be passed.
In case of validity_type as 'By Day of Week' need to pass schedule_details_info parameter with values as
[{
'd': Day of week index(Sunday=0, Monday=1,..,Saturday=6),
'f': From Time(in HH:MM),
't': To Time(in HH:MM)
}]
In case of valiity_type 'Daily Repeating', need to pass schedule_details_info parameter with value as
[{
'wd': [Day of week indexes in string(Sunday=0, Monday=1,..,Saturday=6)],
'f': From Time(in HH:MM),
't': To Time(in HH:MM)
}]
In case of creating Vacancy Code, need to pass code_type parameter with value 'Vacancy Code'.