Add fingerprint by gateway
https://euapi.ttlock.com/v3/fingerprint/add
Only the fingerprint data read by Fingerprint Entry Device F2 can use to request this API to add fingerprint in lock remotely
You can list fingerprints added to a lock by cloud API: Get the fingerprint list of a lock.
1 Request example
POST, ContentType:application/x-www-form-urlencoded
javascript
curl --location -g --request POST 'https://euapi.ttlock.com/v3/fingerprint/add' \
--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \
--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \
--data-urlencode 'lockId=163377' \
--data-urlencode 'fingerprintData=xxxxxxxxxxxxxxxxx' \
--data-urlencode 'fingerprintType=1' \
--data-urlencode 'addType=2' \
--data-urlencode 'fingerprintName=fingerprint of mom' \
--data-urlencode 'startDate=1625025703000' \
--data-urlencode 'endDate=1645025703000' \
--data-urlencode 'date=1625025703000'2 Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| lockId | Int | Y | Lock ID, generated by Lock init |
| fingerprintData | String | Y | Fingerprint data,read by Fingerprint Entry Device F2 |
| fingerprintType | Int | Y | Fingerprint type: 1-normal, 4-recurring |
| addType | Int | Y | Add type, send 2, mean add via gateway or WiFi lock |
| 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. |
| date | Long | Y | Current time (timestamp in millisecond) |
Description of parameters in cyclicConfig:
| Parameter | Type | Description |
|---|---|---|
| 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 |
3 Response and example
| Parameter | Type | Description |
|---|---|---|
| fingerprintId | Int | Fingerprint ID |
{
"fingerprintId": 224242
}