Create lock code

Parameter

FieldTypeDescription
hub_id/device_id/property_idUuid/Uuid/IntegerEither hub's or device's or property's unique ID should be passed
validity_typeStringCode Validity Type. Allowed values are 'By Day of Week', 'Specific Period','Never Expires', 'Daily Repeating'.
device_ids optionalArrayDevice'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 'Specific Period' need to pass 'from_date' and 'to_date' in form of YYYY-MM-DD HH-MM

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'.

Language
Credentials
Bearer
URL
Click Try It! to start a request and see the response here!