1.Overview
Developers must supply the required parameters to issue multi-room cards. To use the contactless card issuance, reading, and cancellation APIs, users must download the QR Master application. Administrators must enable issuance and printing permissions for the member in Member Management.
Tips:
If you need to use induction card issuance, card reading and other functions, please first connect creatorMobile/creatorEmail to the mobile phone or email field in the lock shopkeeper-management-member management. At the same time as the interface is docked, you need to go to the member management To enable members to issue printing permissions, the specific operations are as follows: Login lock shopkeeper-management-member management-select room permissions-after you choose, to issue printing permissions / sharing passwords
One card can open multiple rooms: 1 contactless card = 1 primary room + up to 15 additional rooms (16 rooms in total). The primary room is uniquely identified by communityNo/buildNo/floorNo/roomNo; additional rooms are specified in roomIds. Incremental issuance is supported: first call readCard to obtain serialNum and moreRoom (including roomId), or use the room information API to obtain roomId. Merge the room IDs into roomIds and the existing door_types into door_types, then submit them together with serialNum.
2. Request URL
3. Request method
4. Parameter specification
Attribute Type Constraint Explanation
sig String Required Request signature
issueMac String Required Card issuer MAC address
accountSid String Required Developer Account SID, the unique identifier of developer(32 characters of letters and numbers).
communityNo String Required Community No.
buildNo String Required Building No.
floorNo String Required Floor No.
roomNo String Required Room number (primary room)
roomIds String Required Comma-separated room IDs for additional rooms (excluding the primary room). For incremental issuance, merge in the existing room IDs returned by readCard.
door_types String Required Comma-separated primary-room door_type and additional-room open_type values. The first value is for the primary room; the remaining values correspond to roomIds in order. Each value must be 0 (single unlock) or 1 (always open). For incremental issuance, merge in the existing door_types returned by readCard.
endTime String Required QRM valid end time, format: 1808050403 2018, 08, 05, 04, 03 minutes.
creatorAreaCode String Optional Area code in front of the app phone number(corresponding to creatorMobile, if creatorMobile is passed, the current parameters are required)
creatorMobile String Optional Mobile number, this mobile number user should be the same as the application user(Either CreatorMobile or CreatoreMail must be filled in. If both are filled in, CreatorMobile will prevail)
creatorEmail String Optional The mailbox, this mailbox user should be the same as the application user(Either CreatorMobile or CreatoreMail must be filled in. If both are filled in, CreatorMobile will prevail)
creatorPassword String Required User password encrypted by md5, corresponding to the user in the creator account field
serialNum String Required For incremental issuance, pass the existing issuance record ID (serialNum returned by readCard). For initial issuance, pass 0.
owner String Required Cardholder name (required; may be an empty string)
ownerGender Integer Optional Cardholder gender: 0=female, 1=male
ownerAreaCode String Optional Cardholder mobile country/region code
ownerMobile String Optional Cardholder mobile number
operateCardType String Required Card type to operate on. Multi-room cards currently support only 4 (Bluetooth contactless card).
5. Signature generation rules
Concatenate accountSid, communityNo, buildNo, floorNo, roomNo, roomIds, door_types, endTime, issueMac, creatorAreaCode, creatorMobile, creatorPassword, serialNum, owner, operateCardType, and authToken in that order, then calculate the MD5 hash to obtain sig. Obtain authToken from the developer profile. Note: when signing in with creatorEmail, omit creatorAreaCode/creatorMobile if they are empty.
6. Request example
content-type:application/x-www-form-urlencoded
issueMac=7C778A6C7D9C&accountSid=98651082ab89c3f1b50f35caf794179f&communityNo=1316879946&buildNo=001&floorNo=001&roomNo=R007&roomIds=1001,1002&door_types=0,1,1&endTime=1902282359&creatorAreaCode=86&creatorMobile=10000000000&creatorPassword=49dec5fb8af4eeef7c95e7f5c66c8ae6&serialNum=0&owner=mine&operateCardType=4&sig=ffe16ee6d771a575216e8be573b7e51a
Successful result:
{"status":200,"info":"success","data":{"serialNum":"42873468","more":"1","moreRoom":[{"roomId":"1001","door_types":"0"},{"roomId":"1002","door_types":"1"}],"door_types":"0,0,1","writeStatus":"1"}}
Fields: serialNum=new issuance record ID (pass it back on the next incremental issuance or cancellation); more=whether this is a multi-room card; moreRoom=rooms written to the card in this operation (including door_types for each room; merge roomId into roomIds for incremental issuance); door_types=combined type string for the primary and additional rooms; writeStatus=card write result (1=successful write reported, 0=no report received within 20 polls and the issuance record is still pending a card write).
Failure reason returning:
{"status": 5118,"info": "No data is available","message": "Error"}
If a room ID submitted for issuance/cancellation does not exist or does not belong to the community, the following errors are returned respectively. Use the info text to distinguish them:
{"status":6113,"info":"Room not found"}
{"status":6113,"info":"Room does not belong to the current community"}
7. SDK
For PHP, SDK method: makeMoreCard
Hardware Consulting
Software
After-sales
Hotline
400-0900843