# SmartKey Konektor – kompletní API reference Referenční dokumentace všech příkazů, které může váš systém posílat na SmartKey Konektor na adrese **https://connect.smartkey.cz**. ## Přístupové údaje a jejich mapování Od nás máte **jedno client_id + client_secret**. Posíláte je v hlavičkách: ``` X-Client-Id: vase_client_id X-Client-Secret: vas_client_secret ``` Konektor podle nich najde vaši integraci a **veškerou komunikaci s cloudem zámků podepisuje přístupovými údaji vašeho účtu u výrobce**, které máme bezpečně uložené u nás. Vy je nikdy neposíláte, nevidíte a nemusíte řešit tokeny, jejich obnovu ani přihlašování – výměnu údajů („přepočet“) dělá konektor automaticky u každého requestu. ## Společná pravidla - Endpointy volejte `POST https://connect.smartkey.cz/api/v3/...` s parametry v JSON těle (`Content-Type: application/json`); parametry lze poslat i jako query string. - `clientId`, `accessToken`, `clientSecret` a `date` **neposílejte** – doplní je konektor (v tabulkách nejsou uvedeny). - Časy = Unix timestamp v milisekundách. Seznamy se stránkují (`pageNo` od 1, `pageSize`), odpověď obsahuje `pages` a `total`. - Úspěch = `errcode` chybí nebo je `0`; business chyby chodí s HTTP 200 a polem `errcode`/`errmsg` (viz [Chybové kódy](#chybové-kódy)). - Chyby konektoru: HTTP 401 (špatné přihlášení), 403 (deaktivovaná integrace nebo nepovolená cesta), 429 (rate limit 10 req/s), 502 (cloud nedostupný). - Operace označené „vyžaduje gateway“ fungují jen u zámků spárovaných s gateway; bez ní vrací errcode -2012. ## Obsah - [User APIs](#user-apis) - [Lock APIs](#lock-apis) - [Ekey APIs](#ekey-apis) - [Passcode APIs](#passcode-apis) - [Gateway APIs](#gateway-apis) - [IC Card APIs](#ic-card-apis) - [Fingerprint APIs](#fingerprint-apis) - [Face APIs](#face-apis) - [Unlock record APIs](#unlock-record-apis) - [Group APIs](#group-apis) - [Lock upgrade APIs](#lock-upgrade-apis) - [Wireless Keyboard APIs](#wireless-keyboard-apis) - [Remote APIs](#remote-apis) - [Standalone Door Sensor](#standalone-door-sensor) - [NB-IoT APIs](#nb-iot-apis) - [QR code APIs](#qr-code-apis) - [WiFi lock APIs](#wifi-lock-apis) - [Palm Vein APIs](#palm-vein-apis) - [Admin APIs](#admin-apis) - [Tenant APIs](#tenant-apis) - [Chybové kódy](#chybové-kódy) ## User APIs ### `user/register` `POST https://connect.smartkey.cz/api/v3/user/register` Založí virtuální uživatelský účet (heslo posílejte jako MD5). Vrácené uživatelské jméno použijte jako receiverUsername při poslání eKey. | parametr | typ | povinný | popis | |---|---|---|---| | `username` | String | Y | username,only numbers and English letters allowed,this api will return a prefixed username, please GET Access Token with the prefixed username | | `password` | String | Y | Password(32 chars, low case, md5 encrypted ) |
Odpověď | pole | typ | popis | |---|---|---| | `username` | String | Prefixed username, please GET Access Token with this prefixed username |
### `user/resetPassword` `POST https://connect.smartkey.cz/api/v3/user/resetPassword` Resetuje heslo virtuálního uživatelského účtu. | parametr | typ | povinný | popis | |---|---|---|---| | `username` | String | Y | The prefixed username return by cloud API: User register | | `password` | String | Y | New password(32 chars, low case, md5 encrypted ) |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `user/list` `POST https://connect.smartkey.cz/api/v3/user/list` Vrátí seznam virtuálních účtů založených přes API. | parametr | typ | povinný | popis | |---|---|---|---| | `startDate` | Long | N | query by register time,start time (timestamp in millisecond) | | `endDate` | Long | N | query by register time,end time (timestamp in millisecond) | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page, max 200 |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 200 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `user/delete` `POST https://connect.smartkey.cz/api/v3/user/delete` Smaže virtuální uživatelský účet. | parametr | typ | povinný | popis | |---|---|---|---| | `username` | String | Y | The prefixed username return by cloud API: User register |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
## Lock APIs ### `lock/initialize` `POST https://connect.smartkey.cz/api/v3/lock/initialize` Inicializuje zámek do cloudu (páruje se přes SDK). | parametr | typ | povinný | popis | |---|---|---|---| | `lockData` | String | Y | Lock Data,must be get from the callback function of Lock initialie method of APP SDK | | `lockAlias` | String | N | Lock alias | | `groupId` | Int | N | group ID,refer to cloud API: Add group | | `nbInitSuccess` | Int | N | Is NB-IoT lock inited Successfully? 1-yes, 0-no. Only NB-IoT lock need this parameter. |
Odpověď | pole | typ | popis | |---|---|---| | `lockId` | Int | Lock ID | | `keyId` | Int | Admin ekey id |
### `lock/list` `POST https://connect.smartkey.cz/api/v3/lock/list` Vrátí seznam všech zámků účtu (jen zámky, kde je účet hlavním správcem). | parametr | typ | povinný | popis | |---|---|---|---| | `lockAlias` | String | N | Search by lock alias, fuzzy matching | | `groupId` | Int | N | Group ID,search by group, refer to: Add group for detail | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page, default 20, max 1000 |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, default 20, max 10000 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `lock/detail` `POST https://connect.smartkey.cz/api/v3/lock/detail` Vrátí detailní informace o zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `lockId` | Int | Lock ID | | `lockName` | String | Lock name | | `lockAlias` | String | Lock alias | | `lockMac` | String | Lock MAC | | `noKeyPwd` | String | Super passcode, which only belongs to the admin ekey, can be entered on the keypad to unlock | | `electricQuantity` | Int | Lock battery | | `featureValue` | String | characteristic value . it is used to indicate what kinds of feature do a lock support. | | `timezoneRawOffset` | Long | The offset between your time zone and UTC, in millisecond | | `modelNum` | String | Product model (for firmware update) | | `hardwareRevision` | String | Hardware version (for firmware update) | | `firmwareRevision` | String | Firmware version (for firmware update) | | `autoLockTime` | Int | Auto lock time (in seconds), -1 for disable auto lock | | `lockSound` | Int | Lock sound: 0-unknow、1-on, 2-off | | `soundVolume` | Int | Sound Volume:1-5 | | `hasGateway` | Int | Connected to a gateway:0-false、1-true | | `privacyLock` | Int | Privacy lock:0-unknow、1-on, 2-off | | `tamperAlert` | Int | Tamper alert:0-unknow、1-on, 2-off | | `resetButton` | Int | Reset button:0-unknow、1-on, 2-off | | `openDirection` | Int | Open direction:0-unknow、1-left open、2-right open | | `passageMode` | Int | Passage mode:1-enable、2-disable | | `passageModeAutoUnlock` | Int | Passagemode auto unlock:1-on, 2-off, set to 1 then the lock will auto unlock at the time the passage mode start | | `date` | Long | Lock init time (timestamp in millisecond) |
### `lock/delete` `POST https://connect.smartkey.cz/api/v3/lock/delete` Smaže zámek. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/updateLockData` `POST https://connect.smartkey.cz/api/v3/lock/updateLockData` Resetuje data zámku – zneplatní všechny eKey a kódy (destruktivní!). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `lockData` | String | Y | Lock data from APP SDK |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/rename` `POST https://connect.smartkey.cz/api/v3/lock/rename` Přejmenuje zámek. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `lockAlias` | String | Y | New lock alias |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/changeAdminKeyboardPwd` `POST https://connect.smartkey.cz/api/v3/lock/changeAdminKeyboardPwd` Změní hlavní (admin) číselný kód zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `password` | String | Y | New super passcode | | `changeType` | Int | N | Method: 1-via phone bluetooth,must call APP SDK method first, 2-via gateway or WiFi lock , if it's a WiFi lock or it's connected to gateway, you can call this api directly, The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/transfer` `POST https://connect.smartkey.cz/api/v3/lock/transfer` Převede zámek na jiný účet (nevratné!). | parametr | typ | povinný | popis | |---|---|---|---| | `receiverUsername` | String | Y | The receiver's username | | `lockIdList` | String | Y | Lock ID list, example:[1234,3332] |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/updateElectricQuantity` `POST https://connect.smartkey.cz/api/v3/lock/updateElectricQuantity` Nahraje stav baterie naměřený přes SDK. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `electricQuantity` | Int | Y | Lock battery |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/setAutoLockTime` `POST https://connect.smartkey.cz/api/v3/lock/setAutoLockTime` Nastaví čas automatického zamčení v sekundách. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `seconds` | Int | Y | The lock will automatically locked after the specific seconds, this parameter set 0 or -1 mean close auto lock | | `type` | Int | Y | method: 1-via phone bluetooth,must call Set auto lock time method of APP SDK before you request this API 2-via gateway or WiFi lock , you can call this api directly if it's a WiFi lock or it's connected to gateway. The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/configurePassageMode` `POST https://connect.smartkey.cz/api/v3/lock/configurePassageMode` Nastaví průchozí režim (zámek zůstává odemčený v daných časech). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `passageMode` | Int | Y | Passage mode: 1-on, 2-off | | `cyclicConfig` | JsonArray | N | Converting a list of records from a JsonArray to a String, please refer to the example above. Cycle time setting, can only set a maximum of five time periods. | | `autoUnlock` | Int | N | Auto unlock:1-on, 2-off, set to 1 then the lock will auto unlock at the time the passage mode start | | `type` | Int | Y | Method: 1-via phone bluetooth,you should config via APP SDK before you request this API 2-via gateway or WiFi lock ,you can call this api directly if it's a WiFi lock or it's connected to gateway. The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `isAllDay` | Int | All Hours: 1-YES, 2-NO, if is all hours, then startDate and endDate params is ignored. | | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDays` | JsonArray[Int] | Cycle valid days of the week:1-7, e.g. [1,2,3] |
### `lock/getPassageModeConfiguration` `POST https://connect.smartkey.cz/api/v3/lock/getPassageModeConfiguration` Vrátí konfiguraci průchozího režimu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `passageMode` | Int | Passage mode: 1-on, 2-off | | `cyclicConfig` | JsonArray | Cycle time setting | | `autoUnlock` | Int | Auto unlock:1-on, 2-off, set to 1 then the lock will auto unlock at the time the passage mode start |
### `lock/setHotelCardSector` `POST https://connect.smartkey.cz/api/v3/lock/setHotelCardSector` Nastaví sektor hotelových karet. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `sector` | String | Y | Hotel card sector,for example:1,2,3,4,5,6,7,8,9,10 for sectors 1 to 10 |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/updateSetting` `POST https://connect.smartkey.cz/api/v3/lock/updateSetting` Zapíše nastavení zámku (vyžaduje gateway). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `type` | Int | Y | The item to be set:2-Privacy lock、3-Tamper alert、4-Reset button、6-Lock sound、7-Open direction、8-Sound volume、10-Wifi lock's power saving、11-Door unclosed alarm time setting Note: Wifi lock's power saving mode can only be set via bluetooth, it can't be set it via gateway. | | `value` | Int | Y | Value: 1-on、2-off; Open direction:1-left open、2-right open; Sound volume: 1 to 5 Door unclosed alarm time: In seconds, 0 mean off, need door sensor | | `changeType` | Int | | Method: 1-via phone bluetooth, you should call APP SDK method first 2- via gateway or WiFi lock , you can call this api directly if it's a WiFi lock or it's connected to gateway |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/querySetting` `POST https://connect.smartkey.cz/api/v3/lock/querySetting` Přečte nastavení zámku – parametr type určuje položku (vyžaduje gateway). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `type` | Int | Y | The item to be queried: 2-Privacy lock、3-Tamper alert、4-Reset button、7-Open direction |
Odpověď | pole | typ | popis | |---|---|---| | `value` | Int | Value: 1-on、2-off; Open direction:1-left open、2-right open; |
### `lock/getWorkingMode` `POST https://connect.smartkey.cz/api/v3/lock/getWorkingMode` Vrátí nastavené provozní hodiny zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID |
Odpověď | pole | typ | popis | |---|---|---| | `workingMode` | Int | Working status, 1: working all day, 2: not working all day, 3: custom | | `cyclicConfig` | String | Working hours |
### `lock/configWorkingMode` `POST https://connect.smartkey.cz/api/v3/lock/configWorkingMode` Nastaví provozní hodiny zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID | | `workingMode` | String | Y | Working status, 1: working all day, 2: not working all day, 3: custom | | `type` | String | Y | Method: 1-via phone bluetooth,should call APP SDK method to add card first. 2-via gateway or WiFi lock ,you can call this api with type = 2 directly if it's a WiFi lock or it's connected to gateway. The default value is 1. | | `cyclicConfig` | String | N | Time period configuration |
Odpověď | pole | typ | popis | |---|---|---| | `isAllDay` | Int | Whether it is always open all day: 1-Yes, 2-No | | `startTime` | Int | Start time in minutes, e.g. 480 means 8:00 | | `endTime` | Int | End time in minutes, e.g. 1080 means 18:00 | | `weekDays` | JsonArray[Int] | Cycle validity period: 1-7, such as [1,2,3] |
### `lock/getExtraSetting` `POST https://connect.smartkey.cz/api/v3/lock/getExtraSetting` Vrátí zámek podle zadaných parametrů. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID | | `type` | Int | Y | 0 - Retrieve information from the cloud 1 - Retrieve the latest unauthorized alarm information via gateway or Wi-Fi lock |
Odpověď | pole | typ | popis | |---|---|---| | `unauthorizedAttemptAlertFlag` | Int | Unauthorized alarm, 1 - On, 0 - Off | | `unauthorizedAttemptAlertCount` | Int | Unauthorized alerts, number of failures, 0 indicates off. | | `unauthorizedAttemptAlertLockTime` | Int | Unauthorized alarm, lock time, unit - seconds | | `unauthorizedAttemptAlertPwd` | Int | Unauthorized alarm, password flag: 1 - on, 0 - off | | `unauthorizedAttemptAlertCard` | Int | Unauthorized alarm, IC card flag: 1 - On, 0 - Off | | `unauthorizedAttemptAlertFingerprint` | Int | Unauthorized access alarm, fingerprint indicator, 1 - open, 0 - closed |
### `lock/updateUnauthorizedAttemptAlert` `POST https://connect.smartkey.cz/api/v3/lock/updateUnauthorizedAttemptAlert` Upraví vlastnosti zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `type` | Int | Y | 1- Update via Bluetooth; 2- Update via gateway or Wi-Fi lock | | `lockId` | String | Y | Lock ID | | `unauthorizedAttemptAlertFlag` | Int | Y | Unauthorized alarm, 1 - On, 0 - Off | | `unauthorizedAttemptAlertCount` | Int | Y | Unauthorized alerts, number of failures, 0 indicates off. | | `unauthorizedAttemptAlertLockTime` | Int | Y | Unauthorized alarm, lock time, unit - seconds | | `unauthorizedAttemptAlertPwd` | Int | N | Unauthorized alarm, password flag: 1 - on, 0 - off | | `unauthorizedAttemptAlertCard` | Int | N | Unauthorized alarm, IC card flag: 1 - On, 0 - Off | | `unauthorizedAttemptAlertFingerprint` | Int | N | Unauthorized access alarm, fingerprint indicator, 1 - open, 0 - closed |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | | `description` | String | Error Description |
## Ekey APIs ### `key/send` `POST https://connect.smartkey.cz/api/v3/key/send` Odešle eKey (mobilní klíč) uživateli. startDate=0 a endDate=0 znamená trvalý klíč; createUser=1 založí účet příjemce automaticky. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `receiverUsername` | String | Y | The receiver's username | | `keyName` | String | Y | Key name | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond) | | `remarks` | String | N | Comment | | `remoteEnable` | Int | N | Is remote unlock enabled: 1-yes, 2-no | | `keyRight` | Int | N | Is an authorized ekey: 1-yes, 0-no,the default value is 0 | | `createUser` | Int | N | Auto create SmartKey account if receiverUsername is not a registered SmartKey account: 1-yes, 2-no (default), this parameter take effect only when receiverUsername is a mobile number or email, the created account's password is the last six characters of the username. |
Odpověď | pole | typ | popis | |---|---|---| | `keyId` | Int | Ekey ID |
### `key/list` `POST https://connect.smartkey.cz/api/v3/key/list` Vrátí seznam eKey, které účet obdržel. | parametr | typ | povinný | popis | |---|---|---|---| | `lockAlias` | String | N | Search by lock alias, fuzzy matching | | `groupId` | Int | N | Search by group ID, refer to cloud API: Add group for details | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page, max 1000 |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 1000 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `key/get` `POST https://connect.smartkey.cz/api/v3/key/get` Vrátí eKey (mobilní klíč) podle zadaných parametrů. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `keyId` | Int | Ekey ID | | `lockData` | String | Lock data, used to operate lock | | `lockId` | Int | Lock ID | | `userType` | String | Ekey type:110301-admin ekey, 110302-common user ekey | | `keyStatus` | String | Refer to: Ekey status | | `lockName` | String | Lock name | | `lockAlias` | String | Lock alias | | `lockMac` | String | Lock MAC | | `noKeyPwd` | String | Super passcode, which only belongs to the admin ekey, can be entered on the keypad to unlock | | `electricQuantity` | Int | Lock battery | | `startDate` | Long | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | The time when it is expired (timestamp in millisecond) | | `remarks` | String | Comment | | `keyRight` | Int | Is ekey authorized: 0-NO, 1-yes | | `featureValue` | String | characteristic value . it is used to indicate what kinds of feature do a lock support. | | `remoteEnable` | Int | Is remote unlock enabled: 1-yes,2-no | | `passageMode` | Int | Passage mode:1-enable、2-disable | | `timezoneRawOffset` | Long | The offset between your time zone and UTC, in millisecond | | `groupId` | Int | Group ID | | `groupName` | String | Group name |
### `lock/listKey` `POST https://connect.smartkey.cz/api/v3/lock/listKey` Vrátí seznam všech eKey vydaných k zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `searchStr` | String | N | Search keywords, fuzzy search by key name | | `keyRight` | Int | N | Whether the ekey is authorized or not: 0 - No, 1 - Yes, used to filter authorized administrator electronic keys, return all ekeys without this parameter | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page, max 200 | | `orderBy` | Int | Y | Sort by: 0-by name, 1-reverse order by time, 2-reverse order by name |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 200 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `key/delete` `POST https://connect.smartkey.cz/api/v3/key/delete` Smaže eKey (mobilní klíč). | parametr | typ | povinný | popis | |---|---|---|---| | `keyId` | Int | Y | Ekey ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `key/freeze` `POST https://connect.smartkey.cz/api/v3/key/freeze` Dočasně zmrazí eKey (mobilní klíč) – přestane fungovat, lze odmrazit. | parametr | typ | povinný | popis | |---|---|---|---| | `keyId` | Int | Y | Ekey ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `key/unfreeze` `POST https://connect.smartkey.cz/api/v3/key/unfreeze` Odmrazí dříve zmrazený eKey (mobilní klíč). | parametr | typ | povinný | popis | |---|---|---|---| | `keyId` | Int | Y | Ekey ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `key/update` `POST https://connect.smartkey.cz/api/v3/key/update` Upraví vlastnosti eKey. | parametr | typ | povinný | popis | |---|---|---|---| | `keyId` | Int | Y | Ekey ID | | `keyName` | string | N | Ekey name will be modifed | | `remoteEnable` | Int | N | Is remote unlock enabled: 1-yes, 2-no |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `key/changePeriod` `POST https://connect.smartkey.cz/api/v3/key/changePeriod` Změní časovou platnost eKey. | parametr | typ | povinný | popis | |---|---|---|---| | `keyId` | Int | Y | Ekey ID | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond) |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `key/authorize` `POST https://connect.smartkey.cz/api/v3/key/authorize` Povýší eKey na autorizovaného správce zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `keyId` | Int | Y | ekey ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `key/unauthorize` `POST https://connect.smartkey.cz/api/v3/key/unauthorize` Odebere eKey práva správce. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `keyId` | Int | Y | Ekey ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `key/getUnlockLink` `POST https://connect.smartkey.cz/api/v3/key/getUnlockLink` Vytvoří webový odkaz pro odemčení bez aplikace. ## Passcode APIs ### `keyboardPwd/get` `POST https://connect.smartkey.cz/api/v3/keyboardPwd/get` Vygeneruje náhodný číselný kód – funguje na klávesnici okamžitě i bez gateway (kód počítá algoritmus zámku). > ✅ **Doporučeno pro rezervace a hosty:** kód počítá algoritmus zámku – **nezabírá paměť, nepotřebuje bránu, > funguje ihned a nemusí se mazat**. Platnost je na celé hodiny (`startDate`/`endDate` zaokrouhlete na hodinu) > a kód typu období musí být poprvé použit do 24 h od začátku platnosti, jinak propadne. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `keyboardPwdType` | Int | Y | Passcode type,refer to section 2.1 | | `keyboardPwdName` | String | N | Passcode name | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | N | The time when it is expired (timestamp in millisecond) |
Odpověď | pole | typ | popis | |---|---|---| | `keyboardPwd` | String | Passcode | | `keyboardPwdId` | Int | Passcode ID |
### `keyboardPwd/add` `POST https://connect.smartkey.cz/api/v3/keyboardPwd/add` Vytvoří vlastní číselný kód. addType=1 se zapíše při Bluetooth synchronizaci aplikací, addType=2 okamžitě přes gateway. > ⚠️ **Důležité:** vlastní kód se do zámku fyzicky zapisuje a **zabírá jeho paměť (cca 250 kódů na zámek)**. > Vždy posílejte **`addType: 2`** – výchozí `1` kód do zámku nezapíše (čeká na Bluetooth synchronizaci > aplikací) a v cloudu přesto vypadá jako platný. Zapisujte sekvenčně, nejdříve ~24 h před platností, > **kontrolujte `errcode`** (HTTP je vždy 200) a prošlé kódy mažte (`keyboardPwd/delete`, `deleteType: 2`). > Pro rezervace a jednorázové vstupy použijte raději `keyboardPwd/get` – nezabírá paměť a nepotřebuje bránu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `keyboardPwd` | Int | Y | Passcode | | `keyboardPwdName` | String | N | Passcode name | | `keyboardPwdType` | Int | N | Keyboard password type:2-permanent, 3-period, default value is 3 | | `startDate` | Long | N | The time when it becomes valid (timestamp in millisecond), must be required if keyboard password type is 3-period | | `endDate` | Long | N | The time when it is expired (timestamp in millisecond), must be required if keyboard password type is 3-period | | `addType` | Int | Y | Method: 1-via phone bluetooth,should call APP SDK method to add passcode first. 2-via gateway or WiFi lock ,you can call this api directly if it's a WiFi lock or it's connected to gateway.If the WiFi lock is in power-saving mode, it can transmit data asynchronously (using addType = 4). The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `keyboardPwdId` | Int | Passcode ID |
### `lock/listKeyboardPwd` `POST https://connect.smartkey.cz/api/v3/lock/listKeyboardPwd` Vrátí seznam všech číselných kódů zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `searchStr` | String | N | Search keywords, fuzzy search by passcode name or precise match by passcode | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page, max 200 | | `orderBy` | Int | Y | Sort by: 0-by name, 1-reverse order by time, 2-reverse order by name |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 200 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `keyboardPwd/delete` `POST https://connect.smartkey.cz/api/v3/keyboardPwd/delete` Smaže číselný kód. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `keyboardPwdId` | Int | Y | Passcode ID | | `deleteType` | Int | Y | Method: 1-delete with App via Bluetooth, you should delete via bluetooth first 2-delete via WiFi gateway , you can call this api directly if it's a WiFi lock or it's connected to gateway. The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `keyboardPwd/change` `POST https://connect.smartkey.cz/api/v3/keyboardPwd/change` Změní číselný kód. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `keyboardPwdId` | Int | Y | Passcode ID | | `keyboardPwdName` | String | N | New passcode name | | `newKeyboardPwd` | String | N | The new passcode | | `startDate` | Long | N | The start time of the new passcode (timestamp in millisecond) | | `endDate` | Long | N | The end time of the new passcode (timestamp in millisecond) | | `changeType` | Int | Y | Method: 1-via phone bluetooth, you should call APP SDK method first 2- via gateway or WiFi lock , you can call this api directly if it's a WiFi lock or it's connected to gateway The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
## Gateway APIs ### `lock/unlock` `POST https://connect.smartkey.cz/api/v3/lock/unlock` Vzdáleně odemkne zámek (vyžaduje gateway). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/lock` `POST https://connect.smartkey.cz/api/v3/lock/lock` Vzdáleně zamkne zámek (vyžaduje gateway). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lock/queryOpenState` `POST https://connect.smartkey.cz/api/v3/lock/queryOpenState` Zjistí, zda jsou dveře odemčené/zamčené (vyžaduje gateway). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `state` | Int | Open state of lock:0-locked,1-unlocked,2-unknown |
### `lock/queryDate` `POST https://connect.smartkey.cz/api/v3/lock/queryDate` Přečte aktuální čas zámku (vyžaduje gateway). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `date` | Long | Lock time (timestamp in millisecond) |
### `lock/updateDate` `POST https://connect.smartkey.cz/api/v3/lock/updateDate` Synchronizuje čas zámku (vyžaduje gateway). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `date` | Long | The lock time after adjusting (timestamp in millisecond) |
### `lock/queryElectricQuantity` `POST https://connect.smartkey.cz/api/v3/lock/queryElectricQuantity` Přečte aktuální stav baterie ze zámku (vyžaduje gateway). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `electricQuantity` | Int | Lock battery |
### `gateway/list` `POST https://connect.smartkey.cz/api/v3/gateway/list` Vrátí seznam gateway účtu včetně stavu online/offline. | parametr | typ | povinný | popis | |---|---|---|---| | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page, max 200 | | `orderBy` | Int | Y | Sort by: 0-by name, 1-reverse order by time, 2-reverse order by name |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 200 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `gateway/delete` `POST https://connect.smartkey.cz/api/v3/gateway/delete` Smaže gateway. | parametr | typ | povinný | popis | |---|---|---|---| | `gatewayId` | Int | Y | Gateway ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `gateway/rename` `POST https://connect.smartkey.cz/api/v3/gateway/rename` Přejmenuje gateway. | parametr | typ | povinný | popis | |---|---|---|---| | `gatewayId` | Int | Y | gateway id | | `gatewayName` | String | Y | new gateway name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `gateway/transfer` `POST https://connect.smartkey.cz/api/v3/gateway/transfer` Převede gateway na jiný účet (nevratné!). | parametr | typ | povinný | popis | |---|---|---|---| | `receiverUsername` | String | Y | The receiver's username, must be a registered account. | | `gatewayIdList` | String | Y | Gateway ID list, example:[1234,3332] |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `gateway/listByLock` `POST https://connect.smartkey.cz/api/v3/gateway/listByLock` Vrátí seznam gateway přiřazených k zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records |
### `gateway/listLock` `POST https://connect.smartkey.cz/api/v3/gateway/listLock` Vrátí seznam zámků připojených k gateway. | parametr | typ | povinný | popis | |---|---|---|---| | `gatewayId` | Int | Y | Gateway ID |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records |
### `gateway/listDevice` `POST https://connect.smartkey.cz/api/v3/gateway/listDevice` Vrátí seznam zařízení připojených ke gateway. | parametr | typ | povinný | popis | |---|---|---|---| | `gatewayId` | Int | Y | Gateway ID |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | record list |
### `gateway/detail` `POST https://connect.smartkey.cz/api/v3/gateway/detail` Vrátí detailní informace o gateway. | parametr | typ | povinný | popis | |---|---|---|---| | `gatewayId` | Int | Y | GatewayId, from init gateway API |
Odpověď | pole | typ | popis | |---|---|---| | `gatewayId` | Int | Gateway ID | | `gatewayMac` | String | Gateway MAC | | `gatewayName` | String | Gateway name | | `gatewayVersion` | Int | The version of gateway, 1-G1,2-G2,3-G3(wired gateway),4-G4(4G gateway) | | `networkName` | String | The network name gateway connected to. | | `networkMac` | String | Mac address of the network to which the gateway is connected | | `lockNum` | Int | The number of locks connected to the gateway. | | `isOnline` | Int | Is it online: 0-No, 1-Yes. The gateway will maintain a TCP connection with the gateway server, the cloud server consider it online if the connection is present, plug off the gateway may not break the connection immediately, it may take several minutes for the gateway server to break the connection after heartbeat timeout. |
### `gateway/isInitSuccess` `POST https://connect.smartkey.cz/api/v3/gateway/isInitSuccess` Ověří podle MAC adresy, zda byla gateway úspěšně inicializována. | parametr | typ | povinný | popis | |---|---|---|---| | `gatewayNetMac` | String | Y | The Mac which you will get when calling the APP SDK method to add a gateway |
Odpověď | pole | typ | popis | |---|---|---| | `gatewayId` | Int | Gateway ID |
### `gateway/uploadDetail` `POST https://connect.smartkey.cz/api/v3/gateway/uploadDetail` | parametr | typ | povinný | popis | |---|---|---|---| | `gatewayId` | Int | Y | Gateway ID, returned by: Gateway init | | `modelNum` | String | Y | Product model | | `hardwareRevision` | String | Y | Hardware version | | `firmwareRevision` | String | Y | Firmware version | | `networkName` | String | Y | The network name gateway connected to |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `gateway/upgradeCheck` `POST https://connect.smartkey.cz/api/v3/gateway/upgradeCheck` Zkontroluje dostupnost aktualizace firmwaru. | parametr | typ | povinný | popis | |---|---|---|---| | `gatewayId` | Int | Y | Gateway ID |
Odpověď | pole | typ | popis | |---|---|---| | `needUpgrade` | Int | Is upgrading available: 0-No, 1-Yes, 2-Unknown | | `firmwareInfo` | String | Firmware info, will be used in APP SDK | | `version` | String | Latest firmware version |
### `gateway/setUpgradeMode` `POST https://connect.smartkey.cz/api/v3/gateway/setUpgradeMode` Nastaví gateway. | parametr | typ | povinný | popis | |---|---|---|---| | `gatewayId` | Int | Y | Gateway ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
## IC Card APIs ### `identityCard/add` `POST https://connect.smartkey.cz/api/v3/identityCard/add` Přidá IC kartu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `cardNumber` | String | Y | Card number (1) card number returned by by APP SDK; (2) read from card reader. | | `cardName` | String | N | Card name | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent. | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent. | | `cardType` | Int | N | Card type:1-noraml card、4-cyclic(default value is 1) | | `cyclicConfig` | JSONArray | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `addType` | Int | Y | Method: 1-via phone bluetooth,should call APP SDK method to add card first. 2-via gateway or WiFi lock ,you can call this api directly if it's a WiFi lock or it's connected to gateway. The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDay` | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
### `identityCard/list` `POST https://connect.smartkey.cz/api/v3/identityCard/list` Vrátí stránkovaný seznam IC karty. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `searchStr` | String | N | Search keywords, fuzzy search by IC card name | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page,max 200 | | `orderBy` | Int | Y | Sort by: 0-by name, 1-reverse order by time, 2-reverse order by name |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 200 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `identityCard/delete` `POST https://connect.smartkey.cz/api/v3/identityCard/delete` Smaže IC kartu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `cardId` | Int | Y | Card ID,get from Cloud API: Add card | | `deleteType` | Int | Y | Method: 1-delete with App via Bluetooth, you should delete via bluetooth first 2-delete via gateway or WiFi lock, you can call this api directly if it's a WiFi lock or it's connected to gateway. The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `identityCard/changePeriod` `POST https://connect.smartkey.cz/api/v3/identityCard/changePeriod` Změní časovou platnost IC karty. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `cardId` | Int | Y | Card ID,get from Cloud API: Add card | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond), you can't change it to permanent | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond), you can't change it to permanent | | `cyclicConfig` | JSONArray | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `changeType` | Int | Y | Method: 1-via phone bluetooth, you should call APP SDK method first 2- via gateway or WiFi lock , you can call this api directly if it's a WiFi lock or it's connected to gateway The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDay` | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
### `identityCard/clear` `POST https://connect.smartkey.cz/api/v3/identityCard/clear` Smaže všechny IC karty na zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `identityCard/rename` `POST https://connect.smartkey.cz/api/v3/identityCard/rename` Přejmenuje IC kartu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID | | `cardId` | Int | Y | Card ID,get from Cloud API: Add card | | `cardName` | String | Y | New card name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
## Fingerprint APIs ### `fingerprint/add` `POST https://connect.smartkey.cz/api/v3/fingerprint/add` Přidá otisk prstu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `fingerprintNumber` | Int | Y | Fingerprint number, get from Adding a fingerprint via APP SDK | | `fingerprintType` | Int | Y | Fingerprint type: 1-normal, 4-recurring | | `fingerprintName` | String | N | Fingerprint name | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent. | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent. | | `cyclicConfig` | JSONArray | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDay` | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
### `fingerprint/list` `POST https://connect.smartkey.cz/api/v3/fingerprint/list` Vrátí stránkovaný seznam otisku prstu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `searchStr` | String | N | Search keywords, fuzzy search by fingerprint name | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page,max 200 | | `orderBy` | Int | Y | Sort by: 0-by name, 1-reverse order by time, 2-reverse order by name |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 200 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `fingerprint/delete` `POST https://connect.smartkey.cz/api/v3/fingerprint/delete` Smaže otisk prstu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `fingerprintId` | Int | Y | Fingerprint ID,get from cloud API: Add fingerprint | | `deleteType` | Int | Y | Method: 1-delete with App via Bluetooth, you should delete via bluetooth first 2-delete via gateway or WiFi lock, you can call this api directly if it's a WiFi lock or it's connected to gateway. The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `fingerprint/changePeriod` `POST https://connect.smartkey.cz/api/v3/fingerprint/changePeriod` Změní časovou platnost otisku prstu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `fingerprintId` | Int | Y | Fingerprint ID, get from cloud API: Add fingerprint | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond), you can't change it to permanent | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond), you can't change it to permanent | | `cyclicConfig` | JSONArray | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `changeType` | Int | Y | Method: 1-via phone bluetooth, you should call APP SDK method first 2- via gateway or WiFi lock , you can call this api directly if it's a WiFi lock or it's connected to gateway The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDay` | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
### `fingerprint/clear` `POST https://connect.smartkey.cz/api/v3/fingerprint/clear` Smaže všechny otisku prstu na zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `fingerprint/rename` `POST https://connect.smartkey.cz/api/v3/fingerprint/rename` Přejmenuje otisk prstu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID | | `fingerprintId` | Int | Y | fingerprint id | | `fingerprintName` | String | Y | new fingerprint name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
## Face APIs ### `face/getFeatureDataByPhoto` `POST https://connect.smartkey.cz/api/v3/face/getFeatureDataByPhoto` Vrátí záznam obličeje podle zadaných parametrů. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `image` | File/Image | Y | Face photo, size limit: 300KB~2MB, format: jpg、png、bmp |
Odpověď | pole | typ | popis | |---|---|---| | `featureData` | String | Human face feature data, Hexadecimal string |
### `face/add` `POST https://connect.smartkey.cz/api/v3/face/add` Přidá záznam obličeje. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `name` | String | N | Face name | | `faceNumber` | String | N | Face Number Face Number return by APP SDK; Don't need this parameter if add face via gateway or WiFi lock | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent. | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent. | | `type` | Int | N | 1-normal,4-cyclic(default value is 1) | | `cyclicConfig` | JsonArray | N | Cyclic operation time setting (need to pass only for cyclic type) | | `featureData` | String | N | Face feature data, Gained by Get feature data by photo API,this parameter will be used in remote add face | | `addType` | Int | Y | Method: 1-via phone bluetooth,should call APP SDK method to add face first. 2-via gateway or WiFi lock ,you can call this api directly if it's a WiFi lock or it's connected to gateway. The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDay` | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
### `face/list` `POST https://connect.smartkey.cz/api/v3/face/list` Vrátí stránkovaný seznam záznamu obličeje. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `searchStr` | String | N | Search string (name fuzzy matching) | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page,max 200 |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 200 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `face/delete` `POST https://connect.smartkey.cz/api/v3/face/delete` Smaže záznam obličeje. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `faceId` | Int | Y | Face ID,generated from Add face API | | `type` | Int | Y | Method: 1-delete with App via Bluetooth, you should delete via bluetooth first 2-delete via gateway or WiFi lock, you can call this api directly if it's a WiFi lock or it's connected to gateway. The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `face/changePeriod` `POST https://connect.smartkey.cz/api/v3/face/changePeriod` Změní časovou platnost záznamu obličeje. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `faceId` | Int | Y | Face ID, generated from Add face API | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond), you can't change it to permanent | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond), you can't change it to permanent | | `cyclicConfig` | String | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `type` | Int | Y | Method: 1-via phone bluetooth, you should call APP SDK method first 2- via gateway or WiFi lock , you can call this api directly if it's a WiFi lock or it's connected to gateway The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDay` | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
### `face/clear` `POST https://connect.smartkey.cz/api/v3/face/clear` Smaže všechny záznamu obličeje na zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `face/rename` `POST https://connect.smartkey.cz/api/v3/face/rename` Přejmenuje záznam obličeje. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID | | `faceId` | Int | Y | Face ID,generated from Add face API | | `name` | String | Y | New face name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
## Unlock record APIs ### `lockRecord/list` `POST https://connect.smartkey.cz/api/v3/lockRecord/list` Vrátí historii odemykání zámku (kdo, kdy a čím odemkl) v zadaném časovém rozsahu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `startDate` | Long | N | Start time, search by operate time(timestamp in millisecond) | | `endDate` | Long | N | End time, search by operate time (timestamp in millisecond) | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page, max 200 | | `uid` | Int | N | User ID,for searching the operation records of a certain user | | `recordType` | Int | N | Record type:-5-face、-4-QR code、4-keyboard password、7-IC card、8-fingerprint、55-remote,Default return all records | | `searchStr` | String | N | Search key string:face number、QR code number、password、IC card number、fingerprint number、remote Mac |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 200 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `lockRecord/upload` `POST https://connect.smartkey.cz/api/v3/lockRecord/upload` Nahraje záznamy odemknutí načtené ze zámku přes SDK. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `records` | String | Y | Lock records, please make sure it's read from lock by APP SDK. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lockRecord/delete` `POST https://connect.smartkey.cz/api/v3/lockRecord/delete` Smaže záznam odemknutí. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `recordIdList` | Array | Y | Records Id list,from Lock record list API |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `lockRecord/clear` `POST https://connect.smartkey.cz/api/v3/lockRecord/clear` Smaže všechny záznamů odemykání na zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
## Group APIs ### `group/add` `POST https://connect.smartkey.cz/api/v3/group/add` Přidá skupinu zámků. | parametr | typ | povinný | popis | |---|---|---|---| | `name` | String | Y | Group name |
Odpověď | pole | typ | popis | |---|---|---| | `groupId` | Int | Group ID |
### `group/list` `POST https://connect.smartkey.cz/api/v3/group/list` Vrátí stránkovaný seznam skupiny zámků. | parametr | typ | povinný | popis | |---|---|---|---| | `orderBy` | Int | Y | Sort by: 0-by name, 1-reverse order by time, 2-reverse order by name |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records |
### `lock/setGroup` `POST https://connect.smartkey.cz/api/v3/lock/setGroup` Přiřadí zámek do skupiny. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | String | Y | Lock ID, generated by Lock init | | `groupId` | String | Y | Group ID, from Get gruop list API, this parameter set 0 cancel grouping |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `group/delete` `POST https://connect.smartkey.cz/api/v3/group/delete` Smaže skupinu zámků. | parametr | typ | povinný | popis | |---|---|---|---| | `groupId` | String | Y | Group ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `group/update` `POST https://connect.smartkey.cz/api/v3/group/update` Upraví vlastnosti skupiny zámků. | parametr | typ | povinný | popis | |---|---|---|---| | `groupId` | String | Y | Group ID | | `name` | String | Y | New group name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `group/setDeviceGroup` `POST https://connect.smartkey.cz/api/v3/group/setDeviceGroup` Nastaví skupinu zámků. | parametr | typ | povinný | popis | |---|---|---|---| | `deviceType` | String | Y | Equipment type 0: Lock. 1: Electricity meter. 2: Water meter. | | `deviceId` | String | Y | Device ID | | `groupId` | String | Y | Group ID, returned by the " Get Group List " interface; passing 0 cancels the group. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | | `description` | String | Error description |
## Lock upgrade APIs ### `lock/upgradeCheck` `POST https://connect.smartkey.cz/api/v3/lock/upgradeCheck` Zkontroluje dostupnost aktualizace firmwaru. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `needUpgrade` | Int | Is upgrading available: 0-No, 1-Yes, 2-Unknown | | `firmwareInfo` | String | Lock firmware info | | `firmwarePackage` | String | Firmware package | | `version` | String | Latest firmware version |
### `lock/upgradeRecheck` `POST https://connect.smartkey.cz/api/v3/lock/upgradeRecheck` Přepne zařízení do režimu aktualizace firmwaru. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `lockData` | String | Y | Lock data, get from APP SDK |
Odpověď | pole | typ | popis | |---|---|---| | `needUpgrade` | Int | Is upgrading available: 0-No, 1-Yes, 2-Unknown | | `firmwareInfo` | String | Firmware info | | `firmwarePackage` | String | Firmware package | | `version` | String | Latest firmware version |
## Wireless Keyboard APIs ### `wirelessKeypad/add` `POST https://connect.smartkey.cz/api/v3/wirelessKeypad/add` Přidá bezdrátovou klávesnici. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `wirelessKeypadNumber` | String | Y | Wireless keypad serial number | | `wirelessKeypadName` | String | Y | Wireless keypad name | | `wirelessKeypadMac` | String | Y | Wireless keypad MAC | | `wirelessKeypadFeatureValue` | String | Y | Feature value of wireless keypad | | `electricQuantity` | Int | N | Wireless keypad battery |
Odpověď | pole | typ | popis | |---|---|---| | `wirelessKeypadId` | Int | Wireless keypad ID |
### `wirelessKeypad/listByLock` `POST https://connect.smartkey.cz/api/v3/wirelessKeypad/listByLock` Vrátí seznam bezdrátové klávesnice přiřazených k zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONObject list of records | |
### `wirelessKeypad/delete` `POST https://connect.smartkey.cz/api/v3/wirelessKeypad/delete` Smaže bezdrátovou klávesnici. | parametr | typ | povinný | popis | |---|---|---|---| | `wirelessKeypadId` | Int | Y | Wireless keypad ID,generated by Add wireless keypad |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `wirelessKeypad/rename` `POST https://connect.smartkey.cz/api/v3/wirelessKeypad/rename` Přejmenuje bezdrátovou klávesnici. | parametr | typ | povinný | popis | |---|---|---|---| | `wirelessKeypadId` | Int | Y | Wireless keypad ID,generated by Add wireless keypad | | `wirelessKeypadName` | String | Y | New wireless keypad name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `wirelessKeypad/upgradeCheck` `POST https://connect.smartkey.cz/api/v3/wirelessKeypad/upgradeCheck` Zkontroluje dostupnost aktualizace firmwaru. | parametr | typ | povinný | popis | |---|---|---|---| | `wirelessKeypadId` | Int | Y | wireless keypad ID | | `slotNumber` | Int | Y | slot number | ### `wirelessKeypad/upgradeSuccess` `POST https://connect.smartkey.cz/api/v3/wirelessKeypad/upgradeSuccess` Ověří, zda se aktualizace firmwaru povedla. | parametr | typ | povinný | popis | |---|---|---|---| | `wirelessKeypadId` | Int | Y | wireless keypad ID | | `slotNumber` | Int | Y | slot number | | `featureValue` | String | N | feature value | ## Remote APIs ### `remote/add` `POST https://connect.smartkey.cz/api/v3/remote/add` Přidá dálkový ovladač. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `number` | String | Y | Remote serial number | | `name` | String | N | Name | | `mac` | String | Y | Mac | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | Y | The time when it becomes valid (timestamp in millisecond) | | `type` | Int | N | Type: 1-normal, 4-recurring | | `cyclicConfig` | JsonArray | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `electricQuantity` | Int | Y | Battery | | `firmwareInfo` | JSONObject | Y | Fireware info |
Odpověď | pole | typ | popis | |---|---|---| | `remoteId` | Int | Remote ID |
### `remote/listByLock` `POST https://connect.smartkey.cz/api/v3/remote/listByLock` Vrátí seznam dálkového ovladače přiřazených k zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `orderBy` | Int | Y | Sort by: 0-by name, 1-reverse order by time, 2-reverse order by name |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONObject list of records | |
### `remote/delete` `POST https://connect.smartkey.cz/api/v3/remote/delete` Smaže dálkový ovladač. | parametr | typ | povinný | popis | |---|---|---|---| | `remoteId` | Int | Y | remote ID,generated by Add remote |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `remote/clear` `POST https://connect.smartkey.cz/api/v3/remote/clear` Smaže všechny dálkového ovladače na zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `remote/update` `POST https://connect.smartkey.cz/api/v3/remote/update` Upraví vlastnosti dálkového ovladače. | parametr | typ | povinný | popis | |---|---|---|---| | `remoteId` | Int | Y | remote ID,generated by Add remote | | `name` | String | Y | New remote name | | `startDate` | Long | N | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | N | The time when it becomes valid (timestamp in millisecond) | | `cyclicConfig` | JsonArray | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `changeType` | Int | N | Method: 1-via phone bluetooth, you should call APP SDK method first 2- via gateway or WiFi lock , you can call this api directly if it's a WiFi lock or it's connected to gateway The default value is 1. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `remote/upgradeCheck` `POST https://connect.smartkey.cz/api/v3/remote/upgradeCheck` Zkontroluje dostupnost aktualizace firmwaru. | parametr | typ | povinný | popis | |---|---|---|---| | `remoteId` | Int | Y | Remote ID | | `modelNum` | String | N | product model | | `hardwareRevision` | String | N | hardware version number | | `firmwareRevision` | String | N | firmware version number | ### `remote/upgradeSuccess` `POST https://connect.smartkey.cz/api/v3/remote/upgradeSuccess` Ověří, zda se aktualizace firmwaru povedla. | parametr | typ | povinný | popis | |---|---|---|---| | `remoteId` | Int | Y | remote ID | | `featureValue` | String | N | feature value | ## Standalone Door Sensor ### `standaloneDoorSensor/add` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/add` Přidá položku. | parametr | typ | povinný | popis | |---|---|---|---| | `name` | String | Y | Name | | `doorSensorData` | String | Y | Independent door sensor data must be generated by the APP SDK initial interface. | | `wifiName` | String | Y | WIFI name |
Odpověď | pole | typ | popis | |---|---|---| | `doorSensorId` | Int | Door sensor ID |
### `standaloneDoorSensor/list` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/list` Vrátí stránkovaný seznam položky. | parametr | typ | povinný | popis | |---|---|---|---| | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page, maximum 200 | | `searchStr` | String | N | Search door sensor name |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONObject | list |
### `standaloneDoorSensor/configNetwork` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/configNetwork` Nastaví konfiguraci položky. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | Door sensor ID | | `doorSensorData` | String | Y | Independent door sensor data must be generated by configuring the network interface in the APP SDK. | | `wifiName` | String | Y | WIFI name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | | `errmsg` | String | Error information |
### `standaloneDoorSensor/listRecord` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/listRecord` Vrátí historii záznamů položky. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | Door sensor ID | | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page, maximum 200 |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONObject | list |
### `standaloneDoorSensor/update` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/update` Upraví vlastnosti položky. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | Standalone door sensor ID | | `name` | String | Y | Name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | | `errmsg` | String | Error information |
### `standaloneDoorSensor/delete` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/delete` Smaže položku. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | Door sensor ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | | `errmsg` | String | Error information |
### `standaloneDoorSensor/addDoorSensorUser` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/addDoorSensorUser` Přidá položku. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | Door sensor ID | | `account` | String | Y | Account | | `username` | String | Y | Username |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | | `errmsg` | String | Error information |
### `standaloneDoorSensor/listDoorSensorUser` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/listDoorSensorUser` Vrátí stránkovaný seznam položky. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | door sensor ID | | `searchStr` | String | N | Query Username |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONObject | list |
### `standaloneDoorSensor/deleteDoorSensorUser` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/deleteDoorSensorUser` Smaže položku. | parametr | typ | povinný | popis | |---|---|---|---| | `id` | Int | Y | Share ID |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | | `errmsg` | String | Error information |
### `standaloneDoorSensor/configAlertFlag` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/configAlertFlag` Nastaví konfiguraci položky. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | Door sensor ID | | `notCloseAlertFlag` | Int | Y | Door not closed reminder indicator: Value range 1 - Open, 2 - Closed | | `notCloseAlertSecondNum` | Int | N | Door not closed reminder time, unit: seconds, range: 1~900 seconds. | | `longTimeNotOpenAlertFlag` | Int | Y | Long-term inactivity reminder indicator: Value range 1 - On, 2 - Off | | `longTimeNotOpenDayNum` | Int | N | Long-term door inactivity reminder time, unit: days, range: 1-15 days. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | | `errmsg` | String | Error information |
### `standaloneDoorSensor/getAlertFlag` `POST https://connect.smartkey.cz/api/v3/standaloneDoorSensor/getAlertFlag` Vrátí položku podle zadaných parametrů. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | DS3 ID |
Odpověď | pole | typ | popis | |---|---|---| | `notCloseAlertFlag` | Int | Door not closed reminder indicator: Value range 1 - Open, 2 - Closed | | `notCloseAlertSecondNum` | Int | Door not closed reminder time, unit: seconds, range: 1~900 seconds. | | `longTimeNotOpenAlertFlag` | Int | Long-term inactivity reminder indicator: Value range 1 - On, 2 - Off | | `longTimeNotOpenDayNum` | Int | Long-term door inactivity reminder time, unit: days, range: 1-15 days. |
### `doorSensor/add` `POST https://connect.smartkey.cz/api/v3/doorSensor/add` Přidá dveřní senzor. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `name` | String | N | Door sensor name | | `electricQuantity` | Int | Y | Door sensor battery level | | `firmwareInfo` | JSONObject | Y | Door sensor firmware verion info | | `mac` | String | Y | Door sensor MAC | | `number` | String | Y | Door sensor number |
Odpověď | pole | typ | popis | |---|---|---| | `modelNum` | String | Model number | | `hardwareRevision` | String | hardware revision | | `firmwareRevision` | String | firmware revision |
### `doorSensor/query` `POST https://connect.smartkey.cz/api/v3/doorSensor/query` Zjistí aktuální stav dveřního senzoru (vyžaduje gateway). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `doorSensorId` | Int | Door sensor ID | | `name` | String | Door sensor name | | `electricQuantity` | Int | Door sensor battery level | | `version` | String | firmware version | | `mac` | String | Door sensor MAC | | `number` | String | Door sensor number | | `doorNotClosedWarningTime` | Int | Door unclosed alarm time setting, in seconds, 0 mean off |
### `doorSensor/delete` `POST https://connect.smartkey.cz/api/v3/doorSensor/delete` Smaže dveřní senzor. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | Door sensor ID, generated by Add door sensor |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `doorSensor/update` `POST https://connect.smartkey.cz/api/v3/doorSensor/update` Upraví vlastnosti dveřního senzoru. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | Door sensor id, generated by Add door sensor | | `name` | String | N | New door sensor name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `doorSensor/upgradeCheck` `POST https://connect.smartkey.cz/api/v3/doorSensor/upgradeCheck` Zkontroluje dostupnost aktualizace firmwaru. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | door sensor ID | | `modelNum` | String | N | product model | | `hardwareRevision` | String | N | hardware version number | | `firmwareRevision` | String | N | firmware version number | ### `doorSensor/upgradeSuccess` `POST https://connect.smartkey.cz/api/v3/doorSensor/upgradeSuccess` Ověří, zda se aktualizace firmwaru povedla. | parametr | typ | povinný | popis | |---|---|---|---| | `doorSensorId` | Int | Y | door Sensor ID | ### `doorSensor/listRecord` `POST https://connect.smartkey.cz/api/v3/doorSensor/listRecord` Vrátí historii záznamů dveřního senzoru. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID,Generate by lock initialize | | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page: 20 by default, 200 by maximum. |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | Record list | | `pageNo` | Int | Page numbers start from 1 | | `pageSize` | Int | Number of pages per page, maximum 200 | | `pages` | Int | Total pages | | `total` | Int | Total number of items |
## NB-IoT APIs ### `lock/registerNb` `POST https://connect.smartkey.cz/api/v3/lock/registerNb` Zaregistruje nový virtuální zámek pro příjem eKey. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `nbNodeId` | String | Y | NB-IoT node id | | `nbCardNumber` | String | Y | NB-IoT card number | | `nbOperator` | String | Y | NB-IoT operator:46011-China Telecom、46000-China mobile、21401-Vodafone、50212-Maxis | | `nbRssi` | Int | Y | NB RSSI, reference: >20 is strong, 10Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | ### `lock/getNbDeviceInfo` `POST https://connect.smartkey.cz/api/v3/lock/getNbDeviceInfo` Vrátí zámek podle zadaných parametrů. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `nbNodeId` | String | NB-IoT node id | | `nbCardNumber` | String | NB-IoT card number | | `nbOperator` | String | NB-IoT operator:46011-China Telecom、46000-China mobile、21401-Vodafone、50212-Maxis | | `nbOperatorName` | String | NB-IoT operator name | | `nbRssi` | Int | NB RSSI, reference: >20 is strong, 10 ### `lock/getNbPlatformIpAndPort` `POST https://connect.smartkey.cz/api/v3/lock/getNbPlatformIpAndPort` Vrátí zámek podle zadaných parametrů.
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records |
## QR code APIs ### `qrCode/add` `POST https://connect.smartkey.cz/api/v3/qrCode/add` Vytvoří QR kód pro odemčení zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `name` | String | N | Qr code name | | `type` | Int | Y | QR code type, 1-period, 2-permanent, 4-cyclic | | `startDate` | Long | N | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | N | The time when it is expired (timestamp in millisecond) | | `refreshTime` | Int | N | QR code refresh time, minutes per unit of time, default value is 10, maximum 1440 | | `cyclicConfig` | JSONArray String | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `addType` | Int | Y | Adding method for random QR code: 0- Cloud method. If left blank, the default is 0. A QR code is generated from the cloud. The QR code is generated by the cloud's algorithm rules and can be generated without the lock being connected to a gateway. Adding methods for custom QR code: 1- Add via SDK Bluetooth. You must add via SDK Bluetooth first before calling this interface . 2- Add remotely via gateway or WiFi lock . Lock is a WiFi lock or connected to a gateway , you can go to option 2 and directly call this interface to add it to the lock. | | `qrCodeNumber` | String | N | This parameter is required when adding a custom QR code: Custom QR codes added via APP Bluetooth or gateway require a QR code field. The QR code cannot be larger than 4294967295 and cannot be smaller than 65535. Developers must ensure the QR code number is unique. Recommendation: Developers can directly use a second-level timestamp. |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDay` | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
### `qrCode/list` `POST https://connect.smartkey.cz/api/v3/qrCode/list` Vrátí stránkovaný seznam QR kódu. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page, max 200 | | `name` | String | N | QRcode‘s name |
Odpověď | pole | typ | popis | |---|---|---| | `list` | JSONArray | list of records | | `pageNo` | Int | Page no, start from 1 | | `pageSize` | Int | Items per page, max 200 | | `pages` | Int | Total number of pages | | `total` | Int | Total number of records |
### `qrCode/getData` `POST https://connect.smartkey.cz/api/v3/qrCode/getData` Vrátí QR kód podle zadaných parametrů. | parametr | typ | povinný | popis | |---|---|---|---| | `qrCodeId` | Int | Y | QR code ID, generated by Add QR code |
Odpověď | pole | typ | popis | |---|---|---| | `lockAlias` | String | Lock alias | | `type` | Int | QR code type, 1-period, 2-permanent, 4-cyclic | | `qrCodeNumber` | Int | QR code number: the unique number of QR code in a lock. It's will be contained in the unlocking records for identifing which code unlock the lock. | | `qrCodeContent` | String | QR code data for generating QR code image. | | `name` | String | Qr code name | | `startDate` | Long | The time when it becomes valid, timestamp in milliseconds | | `endDate` | Long | The time when it is expired, timestamp in milliseconds | | `refreshTime` | Int | QR code refresh time, time in minutes | | `cyclicConfig` | JSONArray | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `status` | Int | Status: 1-normal, 2-invalid or expired, 3-pending |
### `qrCode/update` `POST https://connect.smartkey.cz/api/v3/qrCode/update` Upraví vlastnosti QR kódu. | parametr | typ | povinný | popis | |---|---|---|---| | `qrCodeId` | Int | Y | QR code id, generated by Add QR code | | `name` | String | N | Qr code name | | `startDate` | Long | N | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | N | The time when it is expired (timestamp in millisecond) | | `refreshTime` | Int | N | QR code refresh time, time in minutes | | `cyclicConfig` | JSONArray String | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `type` | Int | Y | QR code types: 1-Time-limited, 2-Permanent, 4-Recurring | | `changeType` | Int | Y | Modification methods: 1- Modify via APP Bluetooth. You must modify via APP Bluetooth first before calling this interface. 2- Modify remotely via gateway or WiFi lock. If it is a WiFi lock or connected to a gateway, you can pass to 2 and directly call this interface to modify from the lock. 0- Cloud method. If left blank, the default is 0, which modifies from the cloud. |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | Start time of cyclic, in minutes, for example 480 for 8:00 | | `endTime` | Int | End time of cyclic, in minutes, for example 1080 for 18:00 | | `weekDay` | Int | Week day, 1-7, 1 for monday and 7 for sunday. |
### `qrCode/delete` `POST https://connect.smartkey.cz/api/v3/qrCode/delete` Smaže QR kód. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `qrCodeId` | Int | Y | QR code ID, generated by Add QR code | | `deleteType` | Int | Y | Deletion methods: 1- Delete via APP Bluetooth. You must delete via APP Bluetooth first before calling this interface. 2- Delete remotely via gateway or WiFi lock. If it is a WiFi lock or connected to a gateway, you can send to 2 and directly call this interface to delete from the lock. 0- Cloud method. If left blank, the default is 0, which deletes from the cloud. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message | | `description` | String | Error description |
### `qrCode/clear` `POST https://connect.smartkey.cz/api/v3/qrCode/clear` Smaže všechny QR kódu na zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `type` | Int | Y | Clearing methods: 1- Clear via APP Bluetooth. You must clear via APP Bluetooth first before calling this interface. 2- Clear remotely via gateway or WiFi lock. If it is a WiFi lock or connected to a gateway, you can pass to 2 and directly call this interface to clear from the lock. 0- Cloud method. If not filled in, the default is 0, which clears from the cloud. |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
## WiFi lock APIs ### `wifiLock/updateNetwork` `POST https://connect.smartkey.cz/api/v3/wifiLock/updateNetwork` Nahraje síťovou konfiguraci WiFi zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init | | `networkName` | String | N | The network name lock connected to | | `wifiMac` | String | N | Wifi Mac | | `rssi` | Int | N | Wifi RSSI | | `useStaticIp` | Boolean | N | Use static IP or not | | `ip` | String | N | Static IP address | | `subnetMask` | String | N | Subnet mask | | `defaultGateway` | String | N | Default gateway | | `preferredDns` | String | N | Preferred DNS | | `alternateDns` | String | N | Alternate DNS |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | Error code | | `errmsg` | String | Error message |
### `wifiLock/detail` `POST https://connect.smartkey.cz/api/v3/wifiLock/detail` Vrátí síťové informace WiFi zámku (IP, síla signálu). | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | Lock ID, generated by Lock init |
Odpověď | pole | typ | popis | |---|---|---| | `networkName` | String | The network name lock connected to | | `ip` | String | Static IP address | | `subnetMask` | String | Subnet mask | | `defaultGateway` | String | Default gateway | | `wifiMac` | String | Wifi Mac | | `rssiGrade` | Int | WIFI RSSI grade:3-strong,2-midium,1-weak,0-unknown | | `isOnline` | Int | Online of offline:0-offline,1-online | | `powerSavingMode` | Int | Is in power saving mode:0-unknown、1-yes、2-no | | `preferredDns` | String | Preferred DNS | | `alternateDns` | String | Alternate DNS |
## Palm Vein APIs ### `palmVein/list` `POST https://connect.smartkey.cz/api/v3/palmVein/list` Vrátí stránkovaný seznam záznamu dlaně. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | id of a lock | | `searchStr` | String | N | Search string (name fuzzy matching) | | `pageNo` | Int | Y | Page no, start from 1 | | `pageSize` | Int | Y | Items per page, max 200 |
Odpověď | pole | typ | popis | |---|---|---| | `id` | Int | id of a palm vein | | `name` | String | name of a palm vein | | `number` | String | number of a palm vein | | `status` | String | Status: 1-normal, 2-invalid, 3-pending | | `nickname` | String | nickname of creator | | `startDate` | Long | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | The time when it is expired (timestamp in millisecond) | | `type` | Int | Type:1-Normal、4-Recurring | | `cyclicConfig` | JsonArray | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `createDate` | Long | Creation time |
### `palmVein/add` `POST https://connect.smartkey.cz/api/v3/palmVein/add` Přidá záznam dlaně. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | the id of a lock | | `name` | String | N | name of this palm vein | | `number` | String | Y | number | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond) | | `type` | Int | N | 1、Normal、4-Recurring,type = 1 by default. | | `cyclicConfig` | JsonArray | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDay` | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
### `palmVein/rename` `POST https://connect.smartkey.cz/api/v3/palmVein/rename` Přejmenuje záznam dlaně. | parametr | typ | povinný | popis | |---|---|---|---| | `id` | Int | Y | id of a palm vein | | `name` | String | N | new name |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | error code | | `errmsg` | String | error message | | `description` | String | error message in Chinese |
### `palmVein/changePeriod` `POST https://connect.smartkey.cz/api/v3/palmVein/changePeriod` Změní časovou platnost záznamu dlaně. | parametr | typ | povinný | popis | |---|---|---|---| | `id` | Int | Y | id of a palm vein | | `startDate` | Long | Y | The time when it becomes valid (timestamp in millisecond) | | `endDate` | Long | Y | The time when it is expired (timestamp in millisecond) | | `cyclicConfig` | JsonArray | N | Recurring time period, the valid time period of each week day must be the same, for example: [{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday. | | `type` | Int | N | Method: 1-APP, 2-remote synchronous delivery, 4-WiFi wake-up asynchronous delivery; if not transmitted, the default APP is deleted |
Odpověď | pole | typ | popis | |---|---|---| | `startTime` | Int | The time when it becomes valid, in minute, for example 480 for 8:00 | | `endTime` | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 | | `weekDay` | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
### `palmVein/delete` `POST https://connect.smartkey.cz/api/v3/palmVein/delete` Smaže záznam dlaně. | parametr | typ | povinný | popis | |---|---|---|---| | `id` | Int | Y | id of a palm vein | | `type` | Int | N | Method: 1-APP, 2-remote synchronous delivery, 4-WiFi wake-up asynchronous delivery; do not transmit the default APP |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | error code | | `errmsg` | String | error message | | `description` | String | error message in Chinese |
### `palmVein/clear` `POST https://connect.smartkey.cz/api/v3/palmVein/clear` Smaže všechny záznamu dlaně na zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `lockId` | Int | Y | id of a lock |
Odpověď | pole | typ | popis | |---|---|---| | `errcode` | Int | error code | | `errmsg` | String | error message | | `description` | String | error message in Chinese |
## Admin APIs ### `electricMeter/listGroup` `POST https://connect.smartkey.cz/api/v3/electricMeter/listGroup` Vrátí stránkovaný seznam elektroměru. ### `electricMeter/addGroup` `POST https://connect.smartkey.cz/api/v3/electricMeter/addGroup` Přidá elektroměr. ### `electricMeter/deleteGroup` `POST https://connect.smartkey.cz/api/v3/electricMeter/deleteGroup` Smaže elektroměr. ### `electricMeter/renameGroup` `POST https://connect.smartkey.cz/api/v3/electricMeter/renameGroup` Přejmenuje elektroměr. ### `electricMeter/setGroup` `POST https://connect.smartkey.cz/api/v3/electricMeter/setGroup` Přiřadí zámek do skupiny. ### `electricMeter/list` `POST https://connect.smartkey.cz/api/v3/electricMeter/list` Vrátí stránkovaný seznam elektroměru. | parametr | typ | povinný | popis | |---|---|---|---| | `groupId` | Int | N | Group ID | | `searchStr` | String | N | Search criteria include searching by meter name and a list of meter IDs. | | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page, maximum 1000 | ### `electricMeter/add` `POST https://connect.smartkey.cz/api/v3/electricMeter/add` Přidá elektroměr. | parametr | typ | povinný | popis | |---|---|---|---| | `mac` | String | Y | Electricity Meter MAC | | `name` | Int | Y | Electricity meter name | ### `electricMeter/detail` `POST https://connect.smartkey.cz/api/v3/electricMeter/detail` Vrátí detailní informace o elektroměru. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | Int | Y | Electricity meter ID | ### `electricMeter/syncState` `POST https://connect.smartkey.cz/api/v3/electricMeter/syncState` | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | ### `electricMeter/recharge` `POST https://connect.smartkey.cz/api/v3/electricMeter/recharge` | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `rechargeAmount` | Double | Y | Recharge amount | | `rechargeKwh` | Double | Y | Recharge battery | ### `electricMeter/updatePrice` `POST https://connect.smartkey.cz/api/v3/electricMeter/updatePrice` Upraví vlastnosti elektroměru. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `price` | Double | Y | Unit price | ### `electricMeter/controlOnOff` `POST https://connect.smartkey.cz/api/v3/electricMeter/controlOnOff` | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `onOff` | Int | Y | Power-on status: 0 - No 1 - Yes | ### `electricMeter/clear` `POST https://connect.smartkey.cz/api/v3/electricMeter/clear` Smaže všechny elektroměru na zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | ### `electricMeter/rename` `POST https://connect.smartkey.cz/api/v3/electricMeter/rename` Přejmenuje elektroměr. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `name` | String | Y | Electricity meter name | ### `electricMeter/listOperationRecords` `POST https://connect.smartkey.cz/api/v3/electricMeter/listOperationRecords` Vrátí stránkovaný seznam elektroměru. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `recordType` | String | N | Operation types: 1: Recharge, 2: Power off, 3: Power on, 4: Meter reading, 5: Unit price modification, 6: Reset | | `searchStr` | String | N | Search results | | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page, maximum 1000 | ### `electricMeter/listRecords` `POST https://connect.smartkey.cz/api/v3/electricMeter/listRecords` Vrátí historii záznamů elektroměru. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `dateType` | Int | Y | Date type, 0: day, 1: month, 2: year | | `dateStr` | String | Y | dateType = 0 indicates a query by day, and dateStr must be accurate to the day: 2024-09-06; dateType = 1 indicates a query by month, and dateStr must be accurate to the month: 2024-09; dateType = 2 indicates a query by year, and dateStr must be accurate to the year: 2024 | ### `electricMeter/updateMaxPower` `POST https://connect.smartkey.cz/api/v3/electricMeter/updateMaxPower` Upraví vlastnosti elektroměru. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `maxPower` | Int | Y | Maximum power | ### `electricMeter/updatePayMode` `POST https://connect.smartkey.cz/api/v3/electricMeter/updatePayMode` Upraví vlastnosti elektroměru. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `payMode` | Int | Y | 0 - Energy Metering Mode 1 - Prepaid | | `price` | Double | N | Unit price, required under prepaid model | ### `electricMeter/upgradeCheck` `POST https://connect.smartkey.cz/api/v3/electricMeter/upgradeCheck` Zkontroluje dostupnost aktualizace firmwaru. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | ### `electricMeter/upgradeSuccess` `POST https://connect.smartkey.cz/api/v3/electricMeter/upgradeSuccess` Ověří, zda se aktualizace firmwaru povedla. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | ### `electricMeter/syncSameAdmin` `POST https://connect.smartkey.cz/api/v3/electricMeter/syncSameAdmin` ### `electricMeter/gatewayList` `POST https://connect.smartkey.cz/api/v3/electricMeter/gatewayList` | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | ### `electricMeter/createExecuteToken` `POST https://connect.smartkey.cz/api/v3/electricMeter/createExecuteToken` | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `rechargeKwh` | Double | Y | Recharge amount | | `rechargeAmount` | String | Y | Recharge amount | ### `electricMeter/decodeBleAdvertising` `POST https://connect.smartkey.cz/api/v3/electricMeter/decodeBleAdvertising` | parametr | typ | povinný | popis | |---|---|---|---| | `mac` | String | Y | Electricity Meter MAC | | `executeResponse` | Int | Y | Broadcast data obtained from the SDK | ### `electricMeter/catOneDetail` `POST https://connect.smartkey.cz/api/v3/electricMeter/catOneDetail` | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | ### `electricMeter/configCatOneInfo` `POST https://connect.smartkey.cz/api/v3/electricMeter/configCatOneInfo` Nastaví konfiguraci elektroměru. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `catOneNodeId` | String | Y | Module number | | `catOneCardNumber` | String | Y | Card number | | `catOneOperator` | String | Y | Carriers: CHN-CT - China Telecom, CHINAMOBILE - China Mobile, CHINA MOBILE - China Mobile, CHN-UNICOM - China Unicom | | `catOneImsi` | String | Y | Phone number | | `catOneRssi` | Int | Y | Signal value | | `catOneApn` | String | N | APN | ### `waterMeter/listGroup` `POST https://connect.smartkey.cz/api/v3/waterMeter/listGroup` Vrátí stránkovaný seznam vodoměru. ### `waterMeter/addGroup` `POST https://connect.smartkey.cz/api/v3/waterMeter/addGroup` Přidá vodoměr. ### `waterMeter/deleteGroup` `POST https://connect.smartkey.cz/api/v3/waterMeter/deleteGroup` Smaže vodoměr. ### `waterMeter/renameGroup` `POST https://connect.smartkey.cz/api/v3/waterMeter/renameGroup` Přejmenuje vodoměr. ### `waterMeter/setGroup` `POST https://connect.smartkey.cz/api/v3/waterMeter/setGroup` Přiřadí zámek do skupiny. ### `waterMeter/list` `POST https://connect.smartkey.cz/api/v3/waterMeter/list` Vrátí stránkovaný seznam vodoměru. | parametr | typ | povinný | popis | |---|---|---|---| | `groupId` | Int | N | Water Meter ID | | `searchStr` | String | N | Search criteria include searching by meter name and meter number/water meter ID list. | | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page, maximum 1000 | ### `waterMeter/add` `POST https://connect.smartkey.cz/api/v3/waterMeter/add` Přidá vodoměr. | parametr | typ | povinný | popis | |---|---|---|---| | `mac` | String | Y | Water Meter MAC | | `name` | Int | Y | Water meter name | ### `waterMeter/detail` `POST https://connect.smartkey.cz/api/v3/waterMeter/detail` Vrátí detailní informace o vodoměru. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | Int | Y | Water Meter ID | ### `waterMeter/syncState` `POST https://connect.smartkey.cz/api/v3/waterMeter/syncState` | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | ### `waterMeter/recharge` `POST https://connect.smartkey.cz/api/v3/waterMeter/recharge` | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `rechargeAmount` | Double | Y | recharge money amount | | `rechargeM3` | Double | Y | recharge water amount | ### `waterMeter/updatePrice` `POST https://connect.smartkey.cz/api/v3/waterMeter/updatePrice` Upraví vlastnosti vodoměru. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `price` | Double | Y | Unit price | ### `waterMeter/controlOnOff` `POST https://connect.smartkey.cz/api/v3/waterMeter/controlOnOff` | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `onOff` | Int | Y | Water supply status: 0 - No 1 - Yes | ### `waterMeter/clear` `POST https://connect.smartkey.cz/api/v3/waterMeter/clear` Smaže všechny vodoměru na zámku. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | ### `waterMeter/rename` `POST https://connect.smartkey.cz/api/v3/waterMeter/rename` Přejmenuje vodoměr. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `name` | String | Y | Water meter name | ### `waterMeter/listOperationRecords` `POST https://connect.smartkey.cz/api/v3/waterMeter/listOperationRecords` Vrátí stránkovaný seznam vodoměru. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `recordType` | String | N | Operation types: 1: Recharge, 2: Water outage, 3: Water supply restored, 4: Meter reading, 5: Price modification, 6: Reset. | | `searchStr` | String | N | Search terms | | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page, maximum 1000 | ### `waterMeter/listRecords` `POST https://connect.smartkey.cz/api/v3/waterMeter/listRecords` Vrátí historii záznamů vodoměru. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `dateType` | Int | Y | Date type, 0: day, 1: month, 2: year | | `dateStr` | String | Y | Search criteria: 2024-09-06, 2024-09, or 2024 | ### `waterMeter/updateTotal` `POST https://connect.smartkey.cz/api/v3/waterMeter/updateTotal` Upraví vlastnosti vodoměru. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `totalM3` | Double | Y | Total water consumption | ### `waterMeter/updatePayMode` `POST https://connect.smartkey.cz/api/v3/waterMeter/updatePayMode` Upraví vlastnosti vodoměru. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `payMode` | Int | Y | 0 - Energy Metering 1 - Prepaid | | `price` | Double | N | Unit price, required under prepaid model | ### `waterMeter/upgradeCheck` `POST https://connect.smartkey.cz/api/v3/waterMeter/upgradeCheck` Zkontroluje dostupnost aktualizace firmwaru. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | ### `waterMeter/upgradeSuccess` `POST https://connect.smartkey.cz/api/v3/waterMeter/upgradeSuccess` Ověří, zda se aktualizace firmwaru povedla. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | ### `waterMeter/syncSameAdmin` `POST https://connect.smartkey.cz/api/v3/waterMeter/syncSameAdmin` ### `waterMeter/gatewayList` `POST https://connect.smartkey.cz/api/v3/waterMeter/gatewayList` | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | ### `waterMeter/createExecuteToken` `POST https://connect.smartkey.cz/api/v3/waterMeter/createExecuteToken` | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `rechargeM3` | Double | Y | Recharge warter amount | | `rechargeAmount` | String | Y | Recharge money amount | ### `waterMeter/decodeBleAdvertising` `POST https://connect.smartkey.cz/api/v3/waterMeter/decodeBleAdvertising` | parametr | typ | povinný | popis | |---|---|---|---| | `mac` | String | Y | Water Meter MAC | | `executeResponse` | Int | Y | Broadcast data obtained from the SDK | ### `waterMeter/addTask` `POST https://connect.smartkey.cz/api/v3/waterMeter/addTask` Přidá vodoměr. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `taskType` | Int | Y | Task types: 1-Set remaining water volume, 2-Reset, 3-Recharge, 4-Water cut-off, 5-Water restoration | | `rechargeAmount` | Double | N | Recharge amount | | `rechargeM3` | Double | N | Water recharge | | `remainderM3` | Double | N | Set remaining water volume | ### `waterMeter/cancelTask` `POST https://connect.smartkey.cz/api/v3/waterMeter/cancelTask` | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | Int | Y | Water Meter ID | | `id` | Long | Y | Task ID | ### `waterMeter/finishTask` `POST https://connect.smartkey.cz/api/v3/waterMeter/finishTask` | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | Int | Y | Water Meter ID | | `id` | Long | Y | Task ID | ### `waterMeter/listTask` `POST https://connect.smartkey.cz/api/v3/waterMeter/listTask` Vrátí stránkovaný seznam vodoměru. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `usedFlag` | Int | N | 1: Used, 0: Not used | ### `waterMeter/catOneDetail` `POST https://connect.smartkey.cz/api/v3/waterMeter/catOneDetail` | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | ### `waterMeter/configCatOneInfo` `POST https://connect.smartkey.cz/api/v3/waterMeter/configCatOneInfo` Nastaví konfiguraci vodoměru. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `catOneNodeId` | String | Y | Module number | | `catOneCardNumber` | String | Y | card number | | `catOneOperator` | String | Y | Carriers: CHN-CT - China Telecom, CHINAMOBILE - China Mobile, CHINA MOBILE - China Mobile, CHN-UNICOM - China Unicom | | `catOneImsi` | String | Y | Phone number | | `catOneRssi` | Int | Y | signal value | | `catOneApn` | String | N | APN | ## Tenant APIs ### `electricMeterUser/listRecharge` `POST https://connect.smartkey.cz/api/v3/electricMeterUser/listRecharge` Vrátí stránkovaný seznam položky. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `recordType` | String | N | Operation types: 1: Recharge, 2: Power off, 3: Power on, 4: Meter reading, 5: Unit price modification, 6: Reset | | `searchStr` | String | N | Search results | | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page, maximum 1000 | ### `electricMeterUser/syncState` `POST https://connect.smartkey.cz/api/v3/electricMeterUser/syncState` | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `type` | Int | Y | 2- Through the gateway | ### `electricMeterUser/recharge` `POST https://connect.smartkey.cz/api/v3/electricMeterUser/recharge` | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `type` | Int | Y | 2- Through the gateway | | `rechargeAmount` | Double | Y | Recharge amount | | `executeToken` | String | Y | Token used by tenants when topping up | ### `electricMeterUser/listRecharge` `POST https://connect.smartkey.cz/api/v3/electricMeterUser/listRecharge` Vrátí stránkovaný seznam položky. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `recordType` | String | N | Operation types: 1: Recharge, 2: Power off, 3: Power on, 4: Meter reading, 5: Unit price modification, 6: Reset | | `searchStr` | String | N | Search results | | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page, maximum 1000 | ### `electricMeterUser/listRecords` `POST https://connect.smartkey.cz/api/v3/electricMeterUser/listRecords` Vrátí historii záznamů položky. | parametr | typ | povinný | popis | |---|---|---|---| | `electricMeterId` | String | Y | Electricity meter ID | | `dateType` | Int | Y | Date type, 0: day, 1: month, 2: year | | `dateStr` | String | Y | Search criteria: 2024-09-06, 2024-09, or 2024 | ### `waterMeterUser/detail` `POST https://connect.smartkey.cz/api/v3/waterMeterUser/detail` Vrátí detailní informace o položky. | parametr | typ | povinný | popis | |---|---|---|---| | `mac` | String | Y | Water Meter MAC | ### `waterMeterUser/syncState` `POST https://connect.smartkey.cz/api/v3/waterMeterUser/syncState` | parametr | typ | povinný | popis | |---|---|---|---| | `type` | Int | Y | 2- Through the gateway | | `waterMeterId` | String | Y | Water Meter ID | ### `waterMeterUser/recharge` `POST https://connect.smartkey.cz/api/v3/waterMeterUser/recharge` | parametr | typ | povinný | popis | |---|---|---|---| | `executeToken` | String | Y | Token used by tenants when recharge | | `waterMeterId` | String | Y | Water Meter ID | | `type` | Int | Y | 2- Through the gateway | | `rechargeAmount` | Double | Y | Recharge amount | ### `waterMeterUser/listRecharge` `POST https://connect.smartkey.cz/api/v3/waterMeterUser/listRecharge` Vrátí stránkovaný seznam položky. | parametr | typ | povinný | popis | |---|---|---|---| | `waterMeterId` | String | Y | Water Meter ID | | `recordType` | String | N | Operation types: 1: Top up, 2: Water cut off, 3: Water supply restored, 4: Meter reading, 5: Price modification, 6: Reset. | | `searchStr` | String | N | Search terms | | `pageNo` | Int | Y | Page numbers start from 1 | | `pageSize` | Int | Y | Number of pages per page, maximum 1000 | ### `waterMeterUser/listRecords` `POST https://connect.smartkey.cz/api/v3/waterMeterUser/listRecords` Vrátí historii záznamů položky. | parametr | typ | povinný | popis | |---|---|---|---| | `dateStr` | String | N | Search criteria: 2024-09-06, 2024-09, or 2024 | | `waterMeterId` | String | Y | Water Meter ID | | `dateType` | Int | Y | Date type, 0: day, 1: month, 2: year | ## Chybové kódy | errcode | význam | |---|---| | 1 | failed or means no | | 10000 | client_id does not exist | | 10001 | invalid client,wrong client_id or client_secret | | 10003 | token does not exist | | 10004 | token is invalide or revoked | | 10007 | invalid account or invalid password | | 10011 | invalid refresh_token | | 20002 | not lock admin | | 30002 | invalid username, only English character and digits is allowed | | 30003 | existing registered users | | 30004 | invalid userid to delete | | 30005 | password must be md5 encrypted | | 30006 | exceeds the restrictions of API call number | | 30008 | Cross-site access to user data is prohibited. Please use domain names with the 'cn' prefix to request for Mainland Chinese users, for other region's users please use domain names with the 'eu' prefix to request API endpoints | | 80000 | date must be current time, in 5 minutes | | 80002 | invalid json format | | 90000 | internal server error | | -3 | Invalid Parameter | | -2018 | Permission Denied, many interfaces only allow the lock's top administrator or authorised administrator to request them, some interfaces only require a valid regular key user, please use an access token obtained from a legitimate user's account number and password to request the interface. | | -4063 | Please delete/transfer all yours locks first | | -1003 | Lock does not exist | | -2025 | Frozen lock. Can not operate on it now | | -3011 | Cannot Transfer Lock(s) to Yourself | | -4043 | The function is not supported for this lock | | -4056 | Run out of memory | | -4067 | NB Device is not registered | | -4082 | Auto locking period invalid | | -1008 | eKey does not exist | | -1016 | An identical Name exists. Please choose a different Name. | | -1018 | This Group does not exist | | -1027 | Cant send eKey to this account which has been bound to another account | | -2019 | You cannot send an eKey to Yourself | | -2020 | You cannot send an eKey to the Admin | | -2023 | Can't change the time period now | | -4064 | Failed. The eKey can only be sent to a registered account | | -1007 | No password data of this lock | | -2009 | Invalid Password | | -3006 | Invalid Passcode. Passcode should be between 6 - 9 Digits in length | | -3007 | The same passcode already exists. Please use another one | | -3008 | A Passcode that has never been used on the Lock cannot be changed | | -3009 | There is NO SPACE to store Customized Passcodes. Please Delete Un-Used Customized Passcodes and try again | | -2012 | The Lock is not connected to any Gateway. | | -3002 | The gateway is offline. Please check and try again. | | -3003 | The gateway is busy. Please try again later. | | -3016 | Cannot Transfer Gateway(s) to Yourself. | | -3034 | Network not configed. Please config the network and try again. | | -3035 | Wifi lock is in power saving mode, please turn off power saving and try again. | | -3036 | The lock is offline. Please check and try again. | | -3037 | The lock is busy. Please try again later. | | -4037 | No such Gateway exists. | | -1021 | This IC Card does not exist | | -1023 | This Fingerprint does not exist |