SELOCK DOCS

Aug. 25, 2020, 3:11 p.m.
download Selock Zapier API

Selock Zapier API

We use API key authentication.

You need get token in our site:

And put it in Zapier authentication

 

 

We await token in url https://selock.co/api/v1/zaiper/auth/ in body 'token': <token>


It triggered when the battery charge drops below 20%

 

Subscribe:

https://selock.co/api/v1/zaiper/subscribe/battery/

 

Unsubscribe:

https://selock.co/api/v1/zaiper/unsubscribe/battery/

 

With your Selock token and url in the body:

"hookUrl": "<hook-url>",
"token": "<token>"

 

An example of what we send in the POST:

  • 'message': 'На замке',
  • 'title': 'Низкий заряд баттареи!',
  • 'user_lock_name': 'my first lock',
  • 'lock_id': '*******',
  • 'lock_name': 'lock-***',
  • 'electric_quantity': '50',
  • 'keyboard_pwd_version': '4',
  • 'lock_alias': 'test lock',
  • 'no_key_pwd': '*******',
  • 'lock_mac': '**:**:**:**:**:**',


It triggered when Sciener sends a lock status change callback

 

Subscribe:

https://selock.co/api/v1/zaiper/subscribe/locks/

 

Unsubscribe:

https://selock.co/api/v1/zaiper/unsubscribe/locks/

 

With your Selock token and url in the body:

"hookUrl": "<hook-url>",
"token": "<token>"

 

An example of what we send in the POST: 

  • 'title': 'Замок!',
  • 'user_lock_name': 'my first lock',
  • 'lock_id': '*******',
  • 'lock_name': 'lock-***',
  • 'electric_quantity': '50',
  • 'keyboard_pwd_version': '4',
  • 'lock_alias': 'test lock',
  • 'no_key_pwd': '*******',
  • 'lock_mac': '**:**:**:**:**:**',
  • 'username': 'test@test.test',
  • 'keyboard_pwd': '1234',
  • 'server_date': 1600000000000,
  • 'lock_date': 1600000000000,
  • 'date': 'day.month.Year',
  • 'time': 'hours:minutes:seconds',
  • 'lock_status': 'passcode unlock',
  • 'message': 'Тестовый замок №1 был открыт',
  • 'open': True,
  • 'succes': 1,

 

We send callback data from Sciener
https://open.sciener.com/doc/api/v3/lockRecord/notify/


It triggered when Sciener sends a lock status change callback with success open

 

Subscribe:

https://selock.co/api/v1/zaiper/subscribe/locks_open/

 

Unsubscribe:

https://selock.co/api/v1/zaiper/unsubscribe/locks_open/

 

With your Selock token and url in the body:

"hookUrl": "<hook-url>",
"token": "<token>"

 

An example of what we send in the POST:

  • 'title': 'Замок!',
  • 'user_lock_name': 'my first lock',
  • 'lock_id': '*******',
  • 'lock_name': 'lock-***',
  • 'electric_quantity': '50',
  • 'keyboard_pwd_version': '4',
  • 'lock_alias': 'test lock',
  • 'no_key_pwd': '*******',
  • 'lock_mac': '**:**:**:**:**:**',
  • 'username': 'test@test.test',
  • 'keyboard_pwd': '1234',
  • 'server_date': 1600000000000,
  • 'lock_date': 1600000000000,
  • 'date': 'day.month.Year',
  • 'time': 'hours:minutes:seconds',
  • 'lock_status': 'passcode unlock',
  • 'message': 'Тестовый замок №1 был открыт',

 

We send callback data from Sciener
https://open.sciener.com/doc/api/v3/lockRecord/notify/


It triggered when Sciener sends a lock status change callback with success close

 

Subscribe:

https://selock.co/api/v1/zaiper/subscribe/locks_close/

 

Unsubscribe:

https://selock.co/api/v1/zaiper/unsubscribe/locks_close/

 

With your Selock token and url in the body:

"hookUrl": "<hook-url>",
"token": "<token>"

 

An example of what we send in the POST:

  • 'title': 'Замок!',
  • 'user_lock_name': 'my first lock',
  • 'lock_id': '*******',
  • 'lock_name': 'lock-***',
  • 'electric_quantity': '50',
  • 'keyboard_pwd_version': '4',
  • 'lock_alias': 'test lock',
  • 'no_key_pwd': '*******',
  • 'lock_mac': '**:**:**:**:**:**',
  • 'username': 'test@test.test',
  • 'keyboard_pwd': '1234',
  • 'server_date': 1600000000000,
  • 'lock_date': 1600000000000,
  • 'date': 'day.month.Year',
  • 'time': 'hours:minutes:seconds',
  • 'lock_status': 'passcode unlock',
  • 'message': 'Тестовый замок №1 был открыт',

 

We send callback data from Sciener
https://open.sciener.com/doc/api/v3/lockRecord/notify/


It triggered when a new order is created for the Selock

 

Subscribe:

https://selock.co/api/v1/zaiper/subscribe/orders/

 

Unsubscribe:

https://selock.co/api/v1/zaiper/unsubscribe/orders/

 

With your Selock token and url in the body:

"hookUrl": "<hook-url>",
"token": "<token>",
"order_fields": ["confirmed",]

Values ​​accepted in the order_fields list:

  • not confirmed - the order was created without confirmation
  • confirmed - the order was created confirmed
  • busy - the order was created busy
  • canceled - the order was created canceled
  • all - fires anyway

 

An example of what we send in the POST:

  • 'title': 'Ордер!',
  • 'guest_name': 'Vasiliy',
  • 'guest_surname': 'Ivanov',
  • 'guest_email': 'ivanov@mail.ru',
  • 'guest_phone': '9*********',
  • 'guest_language': 'russian',
  • 'room_name': 'ul Kalatushkina',
  • 'room_category': 'standart',
  • 'room_status': 'clean',
  • 'room_lock_id': '*******',
  • 'start_date': 'day.month.Year',
  • 'end_date': 'day.month.Year',
  • 'hour_in': 12,
  • 'hour_out': 14,
  • 'source': 'Avito',
  • 'language': 'english',
  • 'comment': 'its test order',
  • 'price': 10,
  • 'paid': 5,
  • 'order_status': 'Подтверждён',
  • 'busy': False,
  • 'confirmed': True,
  • 'canceled': False,
  • 'lock_key': '****',
  • 'id': 1,
  • 'date': 'day.month.Year',
  • 'time': 'hours:minutes:seconds',
  • 'message': 'Вася снял комнату'


It triggered when an order for the Silk changes

 

Subscribe:

https://selock.co/api/v1/zaiper/subscribe/orders_change/

 

Unsubscribe:

https://selock.co/api/v1/zaiper/unsubscribe/orders_change/

 

With your Selock token and url in the body:

"hookUrl": "<hook-url>",
"token": "<token>",
"order_change_fields": ["confirmed",]

 

Values ​​accepted in the order_change_fields list:

  • not confirmed - the order has been changed to unconfirmed
  • confirmed - the order has been changed to confirmed
  • busy - the order has been changed to busy
  • canceled - order canceled
  • date and time - change in date or time
  • price - changes in price
  • paid - change in payment
  • lock_key - change the lock code
  • comment - change comment
  • all - any changes to the order

 

An example of what we send in the POST:

  • 'title': 'Ордер!',
  • 'guest_name': 'Vasiliy',
  • 'guest_surname': 'Ivanov',
  • 'guest_email': 'ivanov@mail.ru',
  • 'guest_phone': '9*********',
  • 'guest_language': 'russian',
  • 'room_name': 'ul Kalatushkina',
  • 'room_category': 'standart',
  • 'room_status': 'clean',
  • 'room_lock_id': '*******',
  • 'start_date': 'day.month.Year',
  • 'end_date': 'day.month.Year',
  • 'hour_in': 12,
  • 'hour_out': 14,
  • 'source': 'Avito',
  • 'language': 'english',
  • 'comment': 'its test order',
  • 'price': 10,
  • 'paid': 5,
  • 'order_status': 'Подтверждён',
  • 'busy': False,
  • 'confirmed': True,
  • 'canceled': False,
  • 'lock_key': '****',
  • 'id': 1,
  • 'date': 'day.month.Year',
  • 'time': 'hours:minutes:seconds',
  • 'message': '
  • 'Изменение в заказе ул. Пушкина'


Changes lock status

 

url:

https://selock.co/api/v1/zaiper/change_lock_status/

 

await in the body:

  • token – your Selock token (required)
  • status – close or open (example: “open”) (required)
  • lock_id – Sciener lock ID (example: “1234567”) (required)


Changes your Selock order

 

url:

https://selock.co/api/v1/zaiper/change_order/

 

await in the body:

  • token – your Selock token (required)
  • order_id – Selock order ID (example: 123) (required)
  • start_date – order start date (example: “29-10-2020”)
  • hour_in – order arrival hour (example: 14)
  • end_date – order end date (example: “30-10-2020”)
  • hour_out – order departure hour (example: 12)
  • room – Selock room ID or name (example: 321 or “Апартаменты №12”)
  • comment – your comment on the order (example: “order from a friend”)
  • price – order price (example: 1000)
  • paid – paid order price (example: 500)
  • confirmed – order confirmed status (example: true)
  • busy – order busy status (example: true)
  • canceled – order busy status (example: false)
  • language – order language. This is the name of the language from your Selock account (example: “русский”)
  • source – order source. This is the title of the source from your Selock account (example: “direct sale”)

 


Create your Selock order

 

url:

https://selock.co/api/v1/zaiper/create_order/

 

await in the body:

  • token – your Selock token 
  • guest_name – Guest name of this order (example: “Ivan”) (required)
  • guest_surname – Guest surname of this order (example: “Ivanov”)
  • guest_phone – Guest phone of this order (example: “79012345678”) (required)
  • guest_email – Guest email of this order (example: “ivanivanov@mail.ru”)
  • start_date – order start date (example: “29-10-2020”) (required)
  • hour_in – order arrival hour (example: 14)
  • end_date – order end date (example: “30-10-2020”) (required)
  • hour_out – order departure hour (example: 12)
  • room – Selock room ID or name (example: 321 or “Апартаменты №12”)
  • comment – your comment on the order (example: “order from a friend”)
  • price – order price (example: 1000)
  • paid – paid order price (example: 500)
  • confirmed – order confirmed status (example: true)
  • busy – order busy status (example: true)
  • canceled – order busy status (example: false)
  • language – order language. This is the name of the language from your Selock account (example: “русский”)
  • source – order source. This is the title of the source from your Selock account (example: “direct sale”)


If the order is successfully created, it will return::

{
"res": true,
"order_id": 1
}
where order_id is the id of the created order