文档
测试

绑定月卡Bind monthly card

POST
/bindMonthCard

接口描述

应用场景 Application Scenery 绑定月卡 Bind monthly card

请求参数

application/x-www-form-urlencoded
参数名
类型
描述
必填
token
String
身份标识 Identification
必填
userId
Integer
当不传值此月卡会绑定至虚拟用户 The monthly card will band to the virtual user when no return value
可选
userCardId
String
卡号id cardid
必填
cardType
Integer
2、仅充电月卡 Charging Monthly Card 4、仅停车月卡 Parking Monthly Card 5、可充电可停车月卡 Charging and Parking Monthly Card
必填
areaId
Integer
区域id(此字段可忽略) Area id (This field can be ignored) 默认全国使用 (Default national use)
可选
estateId
Integer
绑定小区,当传此值时,月卡将限定该小区使用,无法在别的小区进行刷卡充电 Bind to a residential area. When this value is transmitted, the monthly card will be limited to the residential area and cannot be charged by swiping card in other residential areas. 默认全国使用 (Default national use)
可选
beginTime
Long
开始时间(毫秒)
必填
endTime
Long
结束时间戳(毫秒)
必填
maxCount
Integer
限次包月(一个月内总次数,当月使用超过此值则不可再开电) Monthly Plan with limited times (The total number of times in a month, if you use more than this value in the current month, you can no longer turn on the electricity) 默认为0,此时月卡不可用 The default is 0, and the monthly card is not available at this time.
可选
dayMaxCount
Integer
限次包月(一天内总次数,当天使用次数超过此值则不可再开电) Monthly Plan with limited times (The total number of times in a month, if you use more than this value in the current month, you can no longer turn on the electricity) 默认为0,当maxCount不为0时,则不限制单天使用次数,只限制月使用次数 The default is 0. When ‘maxCount’ is not 0, the number of times used in a single day is not limited, but only the number of times used per month is limited.
可选
maxTime
Integer
限总时长包月(一个月内总时长,当月使用超过此时长则不可再开电) Monthly Plan with limited usage time (The total time within a month. If you use it longer than this time in the current month, you will not be able to turn on the electricity again.) 默认为0,此时月卡不可用 The default is 0, and the monthly card is not available at this time.
可选
dayMaxTime
Integer
限总时长包月(一天内总时长,当天使用超过此时长则不可再开电) Monthly Plan with limited usage time (The total time within a day. If you use it longer than this time in the day, you will not be able to turn on the electricity again.) 默认为0,当maxTime不为0时,则不限制单天使用时长,只限制月使用时长 The default is 0. When ‘maxCount’ is not 0, the number of times used in a single day is not limited, but only the number of times used per month is limited
可选
limitType
Integer
限次包月 0 Monthly Plan with limited times 1 限总时长包月 1 Monthly plan with limited usage time 2 限充电中订单包月 2 Montly plan with limted orders 默认为限充电中订单包月 Default: Montly plan with limted orders
可选
maxWatt
Integer
限定此卡能充的最大功率 Limit the max power by this card 默认为0,表示不限制 Default:0, unlimited
可选

响应参数

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

说明 / 示例

说明: 注:若已经绑定的月卡,需进行续费,则只需传token、userId或者phone(传phone时会将userId覆盖)、userCardId、beginTime、endTime 其中beginTime、endTime请计算好时间后传参 Note: if you need to renew a bound monthly card, you only need to send token, userId or phone (userId will be overwritten when phone is passed), userCardId, beginTime, endTime. ‘beginTime’ and ‘endTime’: please calculate the time and pass the parameters. 返回示例 Return the example 错误信息 ( error message) ``` { "code": "-2", "error": "此卡已被其它用户绑定", "success": false } ``` ``` { "code": "-1", "error": "卡号不能为空", "success": false } ``` success ``` { "data": { "user": { "alipayUser": false, "cityId": 0, "countyId": 0, "id": 124080, "inTime": 1597200326854, "isCount": 0, "level": 1, "lvccCoin": 0, "owner": "NONE", "ownerId": 370, "provinceId": 0, "userName": "20200812104526_kefu", "userPoint": 0, "wechatAppletUser": false, "wechatUser": false }, "electricCard": { "areaId": 0, "areaType": 0, "cardId": "4BB868FF8CD16382B728C1B9D02B0021", "chargeMonthCard": false, "dayCount": 0, "dayMaxCount": 0, "dayMaxTime": 0, "dayTime": 0, "id": 234, "inTime": 1497387144000, "limitType": 2, "maxCount": 0, "maxTime": 0, "monthCard": false, "monthCount": 0, "monthTime": 0, "status": 0, "type": 0, "userCardId": "1D61643129" } }, "success": true } ```