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