1.Overview
Developers send required parameters to server to generate QR code room card.
2.Examples
Language Explanation Download Version
php php_sdk instructions Download SDK and DEMO V2.0
java java_sdk instructions Download SDK and DEMO V2.0
c# c#_sdk instructions Download SDK and DEMO V2.0
3. Request URL
4. Request parameter format
/?c=Qrcode&a=getLink&sig={sig}
Sig is the encryption result of developer account SID and Auth Token, get details in Development documentation
HTTP request header:
Accept:application/json;
Content-Type:application/x-www-form-urlencode;charset=uft-8;
Authorization:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{"mobile":"1330000000","communityNo":"13444456566","buildNo":"001","floorNo":"001","roomNo":"101","startTime":"1511201800","endTime":"1511211200","areaCode":"86","sendSms":"1","times":"1"}
5. Parameter specification
Attribute Type Constraint Explanation
accountSid String Required Developer Account SID, the unique identifier of developer(32 characters of letters and numbers).
sig String Required Signature, API request required.
Accept String Required Standard HTTP header, content-type: application/json
Content-Type String Required Standard HTTP header, type:application/x-www-form-urlencode;charset=utf-8
Authorization String Required HTTP header authentication information
mobile String Required The card owner's mobile phone number, the parameters passed when the room card is created. Subsequently, you can query the card issue record according to the mobile phone number, etc
communityNo String Required Community No.
buildNo String Optional Building number (notice: building number is optional, and floor number is required too if building number exists.)
floorNo String Optional Floor number (notice: floor number is optional, and building number is required too if floor number exists.)
roomNo String Required Room number(notice: if the parameters of building number and floor number have not been uploaded, please make sure that your room number is unique in this community.)
startTime String Optional QR Code effective start time format: 1506161230 June 16th, 2015 at 12:30, when this parameter is not passed, the effective start time of the room card is the current time of the server.
endTime String Optional QR CodeEnd time 格式:1506161230 15years6month16号12点30分,当不传此Required parameters时,则房卡End time为 service器Now time+CommunitySetting时长,如果没有SettingCommunity房卡时长,则DefaultYesNow time加五 Minutes
areaCode String Optional The user's mobile phone belongs to the country area code, the parameters passed when creating the room card, pay attention to the number before no other characters, default 86.
sendSms String Optional Sure to send a message, 1= send, 0= do not send, default 0.(Note: test accounts cannot support this option)
cardType String Optional Key type (0: room card, 1: floor card, 2: building card, default 0 when not being transmitted).
cipherType String Optional Password Type, 0: Don't generate password(default), 1: Period Password, 2:One-time password. This parameter is only valid for QRP rooms
times String Optional Frequency of Unlocking([When the card type is 0 (room card) and the Lock Type is QRA Lock] it is to take effect and limited between 0 to 254, if no data uploaded, it defaults to 0, which means no limit.)
opentype String Optional Open type,0:Single open(by default);1:Normally open.The lock type shall be QRBLOCK/QRMLOCK/QRALOCK.
isLost String Optional YesNo为Loss-reported card, 0: 非Loss-reported card(Default), 1: Loss-reported card
loss report card After the loss report card is issued, you need to swipe the room lock once, and the previously issued room card will be reported lost and cannot open the door, Currently only supports room card loss report
outInfo String Optional Can't exceed 20 digits, can only be a combination of numbers and letters
6. HTTP JSON request demo
HTTP header
Accept:application/json;
Content-Type:application/x-www-form-urlencode;charset=uft-8;
Authorization:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{"mobile":"1330000000","communityNo":"13444456566","buildNo":"001","floorNo":"001","roomNo":"101","startTime":"1511201800","endTime":"1511211200","sendSms":"1","cardType":"0","times":"1"}
Http Requested parameters
/?c=Qrcode&a=getLink&sig=031A94222BB0AF73AA0DCDEB92D54609
Success response(no: room card unique number): users can get online QR code keys in QR Master after identifying the authentication via mobile number.
{"status":200,"info":"success","cardNo":"2EwNXzAmR9Voq67x","cardType":"2EwNXzAmR9Voq67x"}
Failure reason returning:
{ "status": 403, "info": "some 错误" }
7. XML request demo
HTTP header
Accept:application/xml;
Content-Type:application/x-www-form-urlencode;charset=uft-8;
Authorization:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
<?xml version='1.0' encoding='utf-8'?>
<Request>
<mobile>18819238549</mobile>
<communityNo>1316879800</communityNo>
<buildNo>1</buildNo>
<floorNo>1</floorNo>
<roomNo>401G</roomNo>
<startTime>1511201200</startTime>
<endTime>1511211200</endTime>
<areaCode>86</areaCode>
<sendSms>1</sendSms>
<cardType>0</cardType>
<times>1</times>
</Request>
Http Requested parameters
/?c=Qrcode&a=getLink&sig=031A94222BB0AF73AA0DCDEB92D54609
Success response(no: unique room card number): users can get online QR code keys in QR Master after identifying the authentication via mobile number.
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<status>200</status>
<info>success</info>
<cardNo>2EwNXzAmR9Voq67x</cardNo>;
<cardType>2EwNXzAmR9Voq67x</cardType>
</Response>
Failure reason returning:
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<status>4003</status>
<info> some 错误 </info>
</Response>
Hardware Consulting
Software
After-sales
Hotline
400-0900843