初始化配置
API请求
请求URL
POST
https://{host}/api/rentbox/client/config?rentboxSN={rentboxSN}&sign={sign}
text
/api/rentbox/client/config
text
Content-Type:text/plain
请求参数
名称 | 标识代码 | 是否必填 | 备注 |
---|---|---|---|
服务器域名 | host | YES | 客户提供,例如:s.abc.com |
设备全球唯一码 | rentboxSN | YES | 4G通讯模块,IMEI号 |
接口签名 | sign | YES | MD5加密 |
Body
设备调试信息,客户对接无需关注
json
{
"APN":"AT+QICSGP=1,1,\"3gnet\",\"\",\"\",0",
"soft":"V6089",
"hard":"V2004",
"CRC16":"0x240D",
"EC20_Mead":"Quectel",
"EC20_Type":"EC200N",
"EC20_Version":"EC200NCNLAR03A02M08_DO"
}
接口签名
text
sign=MD5("rentboxSN={rentboxSN}")
请求示例
text
Content-Type:text/plain
Body
{"APN":"AT+QICSGP=1,1,"3gnet","","",0","soft":"V6089","hard":"V2004","CRC16":"0x240D","EC20_Mead":"Quectel","EC20_Type":"EC200N","EC20_Version":"EC200NCNLAR03A02M08_DO"}
sign = 005dca9b80163313e88f249763ac96e9
MD5("rentboxSN=860602069165357")
响应结果
json
{
"code":200,
"type":0,
"data":"{\"dRotationRefer\":\"15\",\"dReturnLocked\":\"0\",\"dHeadConfig\":\"43\",\"dRotationNumber\":\"4\",\"dRotationEnable\":\"1\",\"dMotorEnable\":\"1\",\"dAreaConfig\":\"4\"}",
"msg":"OK",
"time":1705479269271
}
名称 | 标识代码 | 类型 | 备注 |
---|---|---|---|
状态码 | code | int | 默认:200 |
状态类型 | type | int | 默认:0 |
自定义数据 | data | string | 配置参数,字符串需转义JSON对象 |
异常消息 | msg | string | 默认:OK |
时间戳 | time | long | 当前毫秒时间戳 |
配置参数
json
{
"dRotationRefer":"15",
"dReturnLocked":"0",
"dHeadConfig":"43",
"dRotationNumber":"4",
"dRotationEnable":"0",
"dMotorEnable":"0",
"dAreaConfig":"0"
}
名称 | 标识代码 | 类型 | 备注 |
---|---|---|---|
dRotationRefer | dRotationRefer | string | 柜机自检时间(分钟):默认15 |
dReturnLocked | dReturnLocked | string | 预留值:默认0 |
dHeadConfig | dHeadConfig | string | 预留值:默认43 |
dRotationNumber | dRotationNumber | string | 预留值:默认4 |
dRotationEnable | dRotationEnable | string | 预留值:默认0 |
dMotorEnable | dMotorEnable | string | 预留值:默认0 |
dAreaConfig | dAreaConfig | string | 区域码(客户定制),默认0 |