文档
测试

配套门禁开门Matched access control

POST
/openDoor

接口描述

应用场景 Application scenario 针对门禁系统进行远程开门支持 Remote door opening support for access control system

请求参数

application/x-www-form-urlencoded
参数名
类型
描述
必填
token
String
身份标识 Identification
必填
payMoney
Double
单位:元 Unit: Yuan 默认为0,不进行扣费 Default : 0, no deduction. 若传值,同时传入电卡为空,则将对公众号主账号进行扣费操作 If the value is passed and the ‘electric card value’ is return empty, the main account of the official account will be deducted. 请确保主账号有钱,否则将开门失败 Please make sure there is money in the account, otherwise you will fail to activate. 谨慎传值 NOTE: Pass a value before double check
可选
simId
String
SIM卡id SIM Card Id
必填
cardNum
String
当传入卡号时,若此卡不可停车,则开门失败 When passing the card number, if the card is invalid, the door will not open.
可选
portNum
Integer
普通门禁不传 Don’t pass value : Ordinary access control 双路门禁必传 Required: Double Access control 打开进门一侧道闸传1 Pass 1: Open the Entrance 打开出门一侧道闸传2 Pass 2: Open the Exit
可选

响应参数

参数名
类型
描述
必填
data
object
数据字典 data detail
可选
success
boolean
请求成功与否标识 Identification for request success or no
必填
code
String
code
可选
error
String
error message 错误信息
可选

说明 / 示例

说明 返回结果success为true时,请使用查询充电结果接口(/open/query/result)进行查询,当查询开电结果返回success为true,且data数据中result字段为1时才开门成功,否则失败 查询充电结果接口查询:此结果保留1分钟,可定为2秒或者3秒查询一次,超时则算失败 Note: when the returned result ‘success’ is ‘true’, use the ‘Query the charging result’ API (/ open/query/result) to query. When the query result returns ‘success’ is ‘true’, and the ‘result’ field in ‘data’ is 1, the door will be open successfully, otherwise it will fail. ‘Query charging result’ API : this result can be kept for 1 minute and can be queried once in 2 or 3 seconds. If time out, it will be counted as a failure. 返回示例 Return the example ``` { "data": { "domain": "http://lmhc.frp.lbbtech.com", "resultKey": "OPEN_THE_DOOR_866714040034513_0_21913_" }, "success": true } ```