Request method: GET
Request URL: https://open.populife.co/api/auth/access_token/get
| Query parameters | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | App Key obtained from the Populife open platform | 9JQJEPC0ZR9TC4 |
| appSecret | string | Yes | App secret obtained from Populife open platform | b8047ecdb32dca1b0a6d5133fae43c60 |
Instructions:
Access Token which is an authentication to allow an application to access the Populife's APIs. The valid period of each obtained Access Token is 120 minutes. If you obtain the Access Token again, the validity period will be refreshed. In addition, the last obtained Access Token will become invalid. To avoid resource waste from repeated calls, cache Access Token on the local server for a limited time.
Response body example:
{
"success": true,
"code": 200,
"msg": null,
"data": {
"expire": 7200,
"accessToken": "NzMyNmU4MGJjYTk3OTgzODJmYzlhOTc0NWQxMzBlNzFmNTZhMTlmNTdkYjQ2NDFmNmM1OWZiM2JlOTI0ZjE2MQ=="
}
}
| Response parameters | Description | Type |
|---|---|---|
| data.expire | Valid time, in seconds | number |
| data.accessToken | Access Token obtained from Populife open platform | string |
Request method: GET
Request URL: https://open.populife.co/api/lock/list
| Query parameters | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | App Key obtained from the Populife open platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token obtained from Populife open platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| pageNo | string | Yes | page number, starting at 1 | 1 |
| pageSize | string | Yes | number of rows per page | 20 |
Instructions:
Query the information about all lock lists owned by the current AppKey account. After you obtain appKey and appSecret from Populife, please provide the user account you registered in Populife App to Populife technical support team. Technical support will associate your Populife App user account with appKey. Finally, you can query the lock list information of your enterprise associated users in Populife App through this API. After obtaining the lock information, you can use the generate PIN code API to generate the unlocking codes of the locks.
Response body example:
{
"success": true,
"code": 200,
"msg": null,
"data": [
{
"lockId": 723716,
"name": "PPL-ML-E6DE5",
"alias": "PPL-ML-E6DE5",
"mac": "C4:E8:4D:34:32:A5",
"electricQuantity": 100,
"modelNum": "SN138_PPL-DB",
"hardwareRevision": "1.0",
"firmwareRevision": "1.0.0.1108",
"initDate": 1623314021000
}
]
}
| Response parameters | Description | Type |
|---|---|---|
| data.hardwareRevision | Hardware version of the lock | string |
| data.lockId | The digital identity of Populife lock | number |
| data.name | Bluetooth name of the lock, which is the serial number scanned by Bluetooth when adding the lock | string |
| data.alias | Alias of the lock, which is defined by the user | string |
| data.mac | MAC address | string |
| data.electricQuantity | Percentage of the lock battery, non-real-time update, to obtain the battery power from the App after the last Bluetooth sync | number |
| data.modelNum | The model of lock | string |
| data.firmwareRevision | Firmware version of the lock | string |
| data.initDate | The time of user initializes the lock in the App | number |
Request method: POST
Request URL: https://open.populife.co/api/lock/transfer
| Query parameters | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | App Key obtained from the Populife open platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token obtained from Populife open platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockIds | string | Yes | Lock IDs (one or more, multiple locks are separated by ,) | 2059328,2059901,12695599 |
| recUsername | string | Yes | Recipient’s username (email address or mobile number used to register on Populife App) | a49871322@gmail | +1638472744948 |
Instructions
This API interface is used to transfer the lock of the current enterprise to any Populife user account. The ownership of the transferred lock belongs to the target and cannot be restored. Please use it with caution.
Response body example
{"success":true,"code":200,"msg":null,"data":null}
Request method: GET
Request URL: https://open.populife.co/api/password/list
| Query parameters | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | App Key obtained from the Populife open platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token obtained from Populife open platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | The digital identity of Populife lock | 3212108 |
| pageNo | string | Yes | page number, starting at 1 | 1 |
| pageSize | string | Yes | number of rows per page | 20 |
| passcode | string | No | Passcode of the lock | 36006020 |
Instructions:
Obtained a PIN code list of one lock of the user
Response body example:
{
"success": true,
"code": 200,
"msg": null,
"data": [
{
"keyboardPwdId": 43859773,
"keyboardPwd": "06607711",
"keyboardPwdType": 2,
"startDate": null,
"endDate": null,
"createDate": 1590485654000,
"alias": "Home",
"sendUser": " 8613201812820",
"status": 2
}, {
"keyboardPwdId": 43859772,
"keyboardPwd": "06600532",
"keyboardPwdType": 3,
"startDate": 1590485653860,
"endDate": 1590485721300,
"createDate": 1590485654000,
"alias": "Office",
"sendUser": " 8613201812820",
"status": 2
}
]
}
| Response parameters | Description | Type |
|---|---|---|
| data.keyboardPwdType | Types of PIN code (1: One-time, 2: Permanent, 3: Time-limited, 15: Custom time-limited) | number |
| data.keyboardPwdId | PIN code ID | number |
| data.keyboardPwd | Code numbers of the PIN code | string |
| data.startDate | Effective time stamp of the PIN code, GMT+8 | number |
| data.endDate | Expiry time stamp of the PIN code, GMT+8 | number |
| data.sendUser | Creator of the PIN code | string |
| data.createDate | Creation time of the PIN code | number |
| data.alias | Alias of the PIN code | string |
| data.status | Status of PIN code (0: Deleted, 1: Unactivated, 2: Invalid, 3: Valid) | number |
Request method: POST
Request URL: https://open.populife.co/api/password/generate/deadline
| Headers | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| Content-Type | string | Yes | application/x-www-form-urlencoded;charset=utf-8 |
| Request body | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | App Key obtained from the Populife open platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token obtained from Populife open platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | The digital identity of Populife lock | 371920 |
| startDate | string | Yes | Effective time of the PIN code (YYYY-MM-DD HH:00) | 2018-08-12 12:00 |
| endDate | string | Yes | Expiry time of the PIN code(YYYY-MM-DD HH:00) | 2018-08-13 13:00 |
| timeZone | string | Yes | Time Zone | 8 |
| alias | string | No | Alias of the PIN code | Home |
Instructions:
Generates a unlock PIN code of a specific lock, which is valid for a specified period of time. After each initialization, only one time-limited code can be generated for the same lock in the same valid period (which is the same effective time and expiry time). A time-limited code must be used on the lock (to activate it) once within the first 24 hours of the effective time, otherwise the PIN code will automatically become invalid. A maximum of 150 valid PIN codes (of all types) can be stored in a lock. The time precision of a time-limited code is hour (take effect and expire on the hour). Please set a correct GMT time zone based on the country and region.
Response body example:
{
"success": true,
"code": 200,
"msg": null,
"data": {
"keyboardPwdId": 109954189,
"keyboardPwd": "93157137"
}
}
| Response parameters | Description | Type |
|---|---|---|
| data.keyboardPwdId | PIN code ID | number |
| data.keyboardPwd | Code numbers of the PIN code | string |
Request method: POST
Request URL: https://open.populife.co/api/password/generate/permanent
| Headers | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| Content-Type | string | Yes | application/x-www-form-urlencoded;charset=utf-8 |
| Request body | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | App Key obtained from the Populife open platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token obtained from Populife open platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | The digital identity of Populife lock | 371920 |
| alias | string | No | Alias of the PIN code | Home |
Instructions:
Generates a permanently valid PIN code of the lock (the code is invalid unless it is deleted or the lock is reset) A time-limited code must be used on the lock once (to activate it) within 24 hours after it is generated. Otherwise, the code will automatically become invalid. A maximum of 150 valid PIN codes (of all types) can be stored in a lock.
Response body example:
{
"success": true,
"code": 200,
"msg": null,
"data": {
"keyboardPwdId": 109954189,
"keyboardPwd": "93157137"
}
}
| Response parameters | Description | Type |
|---|---|---|
| data.keyboardPwdId | PIN code ID | number |
| data.keyboardPwd | Code numbers of the PIN code | string |
Request method: POST
Request URL: https://open.populife.co/api/password/generate/oneTime
| Headers | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| Content-Type | string | Yes | application/x-www-form-urlencoded;charset=utf-8 |
| Request body | Type | Mandatory | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | App Key obtained from the Populife open platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token obtained from Populife open platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | The digital identity of Populife lock | 371920 |
| alias | string | No | Alias of the PIN code | Home |
Instructions:
Generate a one-time code that automatically becomes invalid once it is used. The one-time code must be used within 6 hours after it is generated, otherwise it will be automatically invalid. A maximum of 150 valid PIN codes (of all types) can be stored in a lock.
Response body example:
{
"success": true,
"code": 200,
"msg": null,
"data": {
"keyboardPwdId": 109954189,
"keyboardPwd": "93157137"
}
}
| Response parameters | Description | Type |
|---|---|---|
| data.keyboardPwdId | PIN code ID | number |
| data.keyboardPwd | Code numbers of the PIN code | string |
Request Method: POST
Request URL: https://open.populife.co/api/password/custom/deadline
| Headers | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| Content-Type | string | Yes | application/x-www-form-urlencoded;charset=utf-8 |
| Request body | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | Application Key provided by the Populife Open Platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token authorized by the Populife Open Platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | Numeric identifier of the Populife lock product | 371920 |
| keyboardPwd | string | Yes | Custom keypad password (6-9 digits) | 88991 |
| startDate | string | Yes | The start effective time of the keypad password (year-month-day hour) | 2018-08-12 12:00 |
| endDate | string | Yes | The expiration time of the keypad password (year-month-day hour) | 2018-08-13 13:00 |
| timeZone | string | Yes | Time zone for the password's validity period | 8 |
| alias | string | No | Password alias | Home |
Detailed Description:
Based on a specific lock, generate a custom time-limited password (6-9 digits consisting of pure numbers). The time precision of the time-limited password is hourly (taking effect and expiring at the exact hour, i.e., 00 minutes). The total number of valid passwords (of all types) that can be stored in a single lock should not exceed 150.
Response body example:
{
"success": true,
"code": 200,
"msg": null,
"data": {
"keyboardPwdId": 109954189
}
}
| Response parameters | Description | Type |
|---|---|---|
| data.keyboardPwdId | Password ID | number |
Request Method: POST
Request URL: https://open.populife.co/api/password/custom/permanent
| Headers | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| Content-Type | string | Yes | application/x-www-form-urlencoded;charset=utf-8 |
| Request body | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | Application Key provided by the Populife Open Platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token authorized by the Populife Open Platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | Numeric identifier of the Populife lock product | 371920 |
| keyboardPwd | string | Yes | Custom keypad password (6-9 digits) | 88991 |
| alias | string | No | Password alias | Home |
Detailed Description:
Generate a custom permanent password (6-9 digits) for a specific lock. The total number of valid passwords (all types) that can be stored simultaneously for one lock cannot exceed 150.
Response body example:
{
"success": true,
"code": 200,
"msg": null,
"data": {
"keyboardPwdId": 109954189
}
}
| Response parameters | Description | Type |
|---|---|---|
| data.keyboardPwdId | Password ID | number |
Request Method: POST
Request URL: https://open.populife.co/api/password/change/code
| Headers | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| Content-Type | string | Yes | application/x-www-form-urlencoded;charset=utf-8 |
| Request body | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | Application Key provided by the Populife Open Platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token authorized by the Populife Open Platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | The digital identity of Populife lock | 3212108 |
| keyboardPwdId | string | Yes | Keypad Password ID | 1920 |
| keyboardPwd | string | Yes | Keypad password (6-9 digits) | 88991 |
Detailed Description:
Custom keypad passwords can be changed at any time as long as the gateway is online. For randomly generated passwords, they can only be changed if the gateway is online and the password has been used at least once.
Response body example:
{
"success": true,
"code": 200,
"msg": "Successfully modified",
"data": null
}
Request Method: POST
Request URL: https://open.populife.co/api/password/change/deadline
| Headers | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| Content-Type | string | Yes | application/x-www-form-urlencoded;charset=utf-8 |
| Request body | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | Application Key provided by the Populife Open Platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token authorized by the Populife Open Platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | The digital identity of Populife lock | 3212108 |
| keyboardPwdId | string | Yes | Keypad Password ID | 1920 |
| startDate | string | Yes | The start effective time of the keypad password (year-month-day hour) | 2018-08-12 12:00 |
| endDate | string | Yes | The expiration time of the keypad password (year-month-day hour) | 2018-08-13 13:00 |
| timeZone | string | Yes | Time zone for the password's validity period | 8 |
Detailed Description:
For time-limited passwords, only the start/end time can be changed, with a precision of hours (taking effect and expiring at the exact hour of 00 minutes). It is possible to change a permanent password to a time-limited one. For recurring passwords, only the recurrence rule (daily/on certain days of the week/weekdays/weekends) + start/end time can be changed. Changing a time-limited password to a recurring one, or vice versa, is not allowed.
Response body example:
{
"success": true,
"code": 200,
"msg": "Successfully modified",
"data": null
}
Request Method: POST
Request URL: https://open.populife.co/api/password/delete
| Headers | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| Content-Type | string | Yes | application/x-www-form-urlencoded;charset=utf-8 |
| Request body | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | Application Key provided by the Populife Open Platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token authorized by the Populife Open Platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | The digital identity of Populife lock | 3212108 |
| keyboardPwdId | string | Yes | Keypad Password ID | 1920 |
Detailed Description:
Custom keypad passwords can be deleted at any time as long as the gateway is online. For randomly generated passwords, they can only be deleted if the gateway is online and the password has been used at least once.
Response body example:
{
"success": true,
"code": 200,
"msg": "Successfully deleted",
"data": null
}
Request Method: GET
Request URL: https://open.populife.co/api/lockRecord/list
| Headers | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| Content-Type | string | Yes | application/x-www-form-urlencoded;charset=utf-8 |
| Request body | Type | Required | Description | Example e.g. |
|---|---|---|---|---|
| appKey | string | Yes | Application Key provided by Populife Open Platform | 9JQJEPC0ZR9TC4 |
| accessToken | string | Yes | Access Token authorized by Populife Open Platform | 1OWZiM2JlOTI0ZjE2MQ...== |
| lockId | string | Yes | Numeric identifier for Populife lock products | 371920 |
| startDate | number | Yes | Start timestamp (0 means no limit) | 1775981754 |
| endDate | number | Yes | End timestamp (0 means no limit) | 1775991721 |
| pageNo | number | Yes | Page number (minimum is 1) | 1 |
| pageSize | number | Yes | Number of records per page | 20 |
Detailed Description:
Unlock record list.
Response Example:
{
"success": true,
"code": 200,
"msg": null,
"data": {
"pageNo": 1,
"pageSize": 2,
"disablePre": true,
"disableNext": false,
"count": 31,
"dataList": [
{
"lockId": 18277584,
"recordType": 1,
"username": "xxx@qq.com",
"keyboardPwd": "",
"operateTime": 1729493892000
},
{
"lockId": 18277584,
"recordType": 1,
"username": "xxx@qq.com",
"keyboardPwd": "",
"operateTime": 1729493865000
}
],
"totalPage": 16,
"beginPage": 1,
"endPage": 10
}
}
| Query parameters | Description | Type |
|---|---|---|
| data.pageNo | Page number, starting from 1 | number |
| data.beginPage | Total number of pages | number |
| data.count | Total number of records | number |
| data.dataList | Record list | list |
| Object in Return List | Description | Type |
|---|---|---|
| lockId | Lock ID | number |
| recordType | Event type: 1: unlock, 2: lock, 3: keyboard password unlock, 4: gateway unlock, 5: gateway lock, 7: fingerprint unlock, 8: IC card unlock, 9: wrong password unlock, 10: NFC unlock | number |
| username | Operator username (email or phone number) | string |
| keyboardPwd | Keyboard password or IC card number | string |
| operateTime | Operation time | number |
| Status codes | Description |
|---|---|
| 200 | Success |
| 900 | Required parameter(s) is missing |
| 500 | Server error |
| 910 | Invalid parameter |