Create
Creates a new pin for the given lock.
POST https://api.tedee.com/api/v37/my/lock/{id}/pin
Note
The pin value must meet the following requirements:
pin cannot be null, empty, or whitespace
pin length must be between 5 and 8 digits
pin can contain only numeric characters (0–9)
pin must contain at least 3 different digits
pin cannot be a strictly ascending or descending sequence (e.g.
12345or54321)
URI Parameters
Name |
Type |
Description |
|---|---|---|
id |
number |
id of the lock |
Body Parameters
Name |
Type |
Description |
|---|---|---|
alias |
string |
name of the pin |
dayEndTime |
datetime (optional) |
end time when pin has access to the device |
dayStartTime |
datetime (optional) |
start time when pin has access to the device |
endDate |
datetime (optional) |
end date when pin has access to the device |
pin |
string |
value of the pin |
startDate |
datetime (optional) |
start date when pin has access to the device |
weekDays |
number (optional) |
week days when pin has access to the device |
Responses
Name |
Type |
Description |
|---|---|---|
201 Created |
successful operation |
|
400 Bad Request |
pin value does not meet validation requirements |
|
403 Forbidden |
user doesn’t have permission to the lock |
|
406 Not Acceptable |
pin already exists |
|
408 Request Timeout |
timeout while sending data to the device |
|
409 Conflict |
another request is currently being processed for this device |
|
412 Precondition Failed |
adding more pins is not available |
|
428 Precondition Required |
lock is disconnected or device setup is incorrect |
Scopes
Name |
Description |
|---|---|
Device.ReadWrite |
Grants user possibility to read and write data connected with devices |
Examples
Create a pin with permanent access to the lock with id 123
Sample request
curl -X POST "https://api.tedee.com/api/v37/my/lock/123/pin" -H "accept: application/json" -H "Content-Type: application/json-patch+json" -H "Authorization: Bearer <<access token>>" -d "<<body>>"
Body:
{
"alias": "test pin 3",
"pin": "918273"
}
Sample response
HTTP status code: 201
{
"result": {
"id": 3
}
"success": true,
"errorMessages": [],
"statusCode": 201
}
Create a pin with restricted access to the lock with id 123
Sample request
curl -X POST "https://api.tedee.com/api/v37/my/lock/123/pin" -H "accept: application/json" -H "Content-Type: application/json-patch+json" -H "Authorization: Bearer <<access token>>" -d "<<body>>"
Body:
{
"alias": "test pin 3",
"pin": "918273",
"startDate": "2021-10-01T00:00:00.000Z",
"endDate": "2021-12-31T00:00:00.000Z",
"dayStartTime": "2021-10-01T10:00:00.000Z",
"dayEndTime": "2021-10-01T18:00:00.000Z",
"weekDays": 1
}
Sample response
HTTP status code: 201
{
"result": {
"id": 3
}
"success": true,
"errorMessages": [],
"statusCode": 201
}