文档
测试

开启充电Start Charging

POST
/charge

接口描述

对设备进行开电,此接口仅支持按时间进行开电,若是对汽车桩进行开电,请实现新消费标准开电接口

请求参数

application/x-www-form-urlencoded
参数名
类型
描述
必填
token
String
身份标识 Identification
必填
deviceId
string
设备id 即设备IMEI号,simId Device ID Device IMEI
必填
portNum
Integer
插座号 Socekt No.
必填
payMoney
Double
金额 Amount 如需避免平台返回错误提示余额不足,请先充值,可将此参数设置为0 To avoid an error returned by the platform that the balance is insufficient, please recharge first. You can set this parameter to 0.
必填
workTime
Integer
充电时长(注:以分钟为单位) Charging time (note: unit: minutes)
必填

响应参数

参数名
类型
描述
必填
data
object
必填
success
boolean
请求成功与否标识 Identification for request success or no
必填

返回字段Data

参数名
类型
描述
必填
portNum
Integer
插座号 Socket No.
必填
domain
String
域名 Domain name
必填
simId
String
SIM卡id SIM Card Id
必填
resultKey
String
查询充电结果Key Query the charging result Key
必填
orderNum
String
订单号 Order No.
必填

说明 / 示例

说明:返回结果success为true时,请使用查询开电结果接口进行查询,当查询开电结果返回success为true,且data数据中result字段为1时才开电成功,否则失败 查询开电结果接口查询:此结果保留45秒,可定为2秒或者3秒查询一次,超时则算失败 Note: If the returned result success is true, use the ‘Query the power-up result’ API to query. If the result returns success as true, and the result field in the data is 1, the power will be activated successfully, otherwise it will fail. Query call result API query: 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": { "portNum":5, "domain":"https://center.lbbtech.com", "simId":"865933034812509", "resultKey":"charge_865933034812509_5_15966_", "orderNum":"20190504152521862699" }, "success":true } ```