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 Phone number,the parameter sent when you create room card
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 Code effective end time format: 1506161230 June 16th, 2015 at 12:30, when this parameter is not passed, The effective end time of the room card is the current time of the server plus the Community setup time. If the Community's card time is not set, the default time is the current time plus five minutes.
areaCode String Optional Country code (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).
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.)
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 error" }
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 error </info>
</Response>
Sales
Software
After-sales
Hotline
400-8618286