@sewise-dev
2019-03-18T08:26:02.000000Z
字数 6345
阅读 745
众德汇
编号 | 版本 | 说明 | 作者 | 日期 |
---|---|---|---|---|
1 | v1.0 | 1.创建文档 | Seven | 2019-03-05 |
每次调用接口时,可能获得正确或错误的返回码,开发者可以根据返回码信息调试接口,排查错误。
返回码 | 说明 |
---|---|
-1 | 系统繁忙,此时请开发者稍候再试 |
0 | 请求失败 |
1 | 请求成功 |
200 | 响应成功 |
403 | 禁止访问 |
404 | 异常错误 |
500 | 数据验证错误 |
40001 | 不合法的凭证,或者access_token无效。 |
40004 | 不合法请求 |
HTTP请求状态返回格式
返回字段 | 字段类型 | 说明 |
---|---|---|
status | Integer | 请求返回码(详细请见状态表) |
message | String | 返回描述 |
data | Array | 返回结果 |
错误样例
{
"status": 40013,
"message": {"0":"invalid appid"}
}
成功样例
{
"status": 200,
"data": {"access_token":"ACCESS_TOKEN","expires_in":7200}
}
/v1/assemble/priceList
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/assemble/priceList
Response
{"status":200,"data":[{"number":"1","needNum":0,"price":2800},{"number":"2","needNum":1,"price":1800},{"number":"3","needNum":2,"price":1200},{"number":"4","needNum":3,"price":888},{"number":"5","needNum":4,"price":365}]}
/v1/assemble/checkMobile
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mobile 是 int 手机号
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/assemble/checkMobile
Response
{"status":200,"data":{"check":1}}
/v1/assemble/save
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mobile 是 string 手机号集合(多个手机号用','逗号隔开) type 是 int 类型:2. 两人团 3. 三人团 4.四人团 5.五人团
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/assemble/save
Response
{"status":200,"data":{"asId":"1","userId":"1485","type":"3","status":"0","amount":1200,"creationDate":"2019-03-06 16:37:12","expireDate":"2019-03-08 16:37:12"}}
/v1/assemble/cancel/{asId}
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/assemble/cancel/5
Response
{
"status": 200,
"message": "操作成功"
}
/v1/wallet/pay
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 orderName 是 String 订单/商品描述 orderType 是 String 订单类型:normal(普通),speech(语音识别),course(课程),swl(课时),knowledge(知识点),live(直播),year(年卡),expert(专家vip),gold(金卡vip) tradeType 否 String 交易类型:(JSAPI,NATIVE,WAP, APP等) totalFee 是 decimal 订单金额(元) members 否 Int 拼团总人数(拼团购买必传) productId 否 String 商品id(如course_id、拼团号asId) ip 否 String 终端IP businessUserId 否 String 商家标识,如openid、userId business 否 String 商家名称 deviceInfo 否 String 设备信息
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/wallet/pay
Response
{"status":200,"message":"\u4e0b\u5355\u6210\u529f\uff0c\u5df2\u652f\u4ed8"}
/v1/assemble/myList
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 status 否 String 参团状态: 0.未参团 1.已参团 -1.拼团失败(未成团) page 否 int 页数 pageSize 否 int 页码 order 否 string 排序:默认ass.asId DESC
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/assemble/myList
Response
{
"status": 200,
"data": [
{
"asId": "4",
"userId": "1485",
"type": "3",
"status": "0",
"amount": "1200.00",
"creationDate": "2019-03-07 09:34:44",
"expireDate": "2019-03-09 09:34:44",
"mobile": "18923480387",
"trueName": "刚",
"avatar": "http://oss.sewise.com/cabafaa582a4041de2dd05eff7bd28bf"
},
{
"asId": "3",
"userId": "1528",
"type": "3",
"status": "0",
"amount": "1200.00",
"creationDate": "2019-03-07 09:28:38",
"expireDate": "2019-03-09 09:28:38",
"mobile": "18786373395",
"trueName": "18807510104",
"avatar": "/widgets/assets/images/pic-b.png"
},
{
"asId": "2",
"userId": "1485",
"type": "3",
"status": "0",
"amount": "1200.00",
"creationDate": "2019-03-06 17:02:35",
"expireDate": "2019-03-08 17:02:35",
"mobile": "18923480387",
"trueName": "刚",
"avatar": "http://oss.sewise.com/cabafaa582a4041de2dd05eff7bd28bf"
}
]
}
/v1/assemble/info/{asId}
application/json
POST
参数 必选 类型 说明 RequestBody asId 是 int 拼团编号 access_token 是 String 用户授权签名
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/assemble/info/4
Response
{
"status": 200,
"data": {
"asmId": "12",
"asId": "4",
"userId": "1520",
"username": "18786373395",
"role": "0",
"amount": "1200.00",
"joinStatus": "0",
"joinDate": "2019-03-07 11:36:53",
"creationDate": "2019-03-07 09:34:44",
"status": "0",
"expireDate": "2019-03-09 09:34:44",
"duration": 151824
}
}
/v1/order/buyList
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 page 否 int 页数,默认1 pageSize 否 int 页码,默认20 order 否 String 排序:orderId desc q 否 String 关键字搜索 orderType 否 int 订单类型:normal(普通),speech(语音识别),course(课程),swl(课时),knowledge(知识点),live(直播),year(年卡),expert(专家vip) payStatus 否 int 支付状态: 1.下单成功(未支付) 2.已支付 startTime 否 String 开始时间 endTime 否 String 结束时间
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": 1,
"pagesize": 20,
"total_record": 1,
"total_amount": "1200.00",
"record": [
{
"orderId": "49",
"orderName": "开通VIP(3人团)",
"outTradeNo": "1193505420201903071136532912",
"orderNo": "1193505420201903071136532912",
"orderType": "year",
"payMode": "WALLET",
"totalFee": "1200.00",
"platformIncomeFee": "1200.00",
"businessIncomeFee": "0.00",
"payStatus": "2",
"tradeType": "APP",
"userId": "1520",
"productId": "4",
"payDate": "2019-03-07 11:36:53",
"businessUserId": null,
"business": null,
"creationDate": "2019-03-07 11:36:53",
"username": null,
"nickName": null,
"assembleData": {
"members": [
{
"userId": "1485",
"username": "18923480387",
"role": "1",
"joinStatus": "1"
},
{
"userId": "1515",
"username": "18675577003",
"role": "0",
"joinStatus": "1"
},
{
"userId": "1520",
"username": "18786373395",
"role": "0",
"joinStatus": "0"
}
],
"status": "0",
"expireDate": "2019-03-09 09:34:44",
"duration": 149943
}
}
]
}
}