Open Platform
Skip to content

Add fingerprint by gateway ​

https://cnapi.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://cnapi.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 ​

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
lockIdIntYLock ID, generated by Lock init
fingerprintDataStringYFingerprint data,read by Fingerprint Entry Device F2
fingerprintTypeIntYFingerprint type: 1-normal, 4-recurring
addTypeIntYAdd type, send 2, mean add via gateway or WiFi lock
fingerprintNameStringNFingerprint name
startDateLongYThe time when it becomes valid (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent.
endDateLongYThe time when it is expired (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent.
cyclicConfigJSONArrayNRecurring 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.
dateLongYCurrent time (timestamp in millisecond)

Description of parameters in cyclicConfig:

ParameterTypeDescription
startTimeIntThe time when it becomes valid, in minute, for example 480 for 8:00
endTimeIntThe time when it becomes validit is expired, in minute, for example 1080 for 18:00
weekDayIntWeek day:1-7, 1-Monday, 2-Tuesday...7-Sunday

3 Response and example ​

ParameterTypeDescription
fingerprintIdIntFingerprint ID
{
    "fingerprintId": 224242
}
CopyRight © 2012-2026 TTLock.All Rights Reserved