@sewise-dev
2018-10-25T08:24:32.000000Z
字数 13005
阅读 561
海高金服
编号 | 版本 | 说明 | 作者 | 日期 |
---|---|---|---|---|
1 | v1.0 | 1.创建文档 | Seven | 2018-10-14 |
每次调用接口时,可能获得正确或错误的返回码,开发者可以根据返回码信息调试接口,排查错误。
返回码 | 说明 |
---|---|
-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/school/personStatistics
application/json
GET
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/school/personStatistics?access_token={access_token}
Response
{
"status": 200,
"data": {
"teacherCounts": 1, // 讲师
"studentCounts": 8, // 学员
"employeeCounts": 1, // 员工
"onlineCounts": 0 // 当前在线
}
}
/v1/school/saveEmployee
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 username 是 string 帐号 password 是 string 密码 nickName 是 string 姓名 mobile 否 int 手机号 avatar 否 string 头像 否 string 邮箱 uId 否 string 员工userId,编辑时必传
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/school/saveEmployee?access_token={access_token}
Response
{"status":200,"message":"\u64cd\u4f5c\u6210\u529f","data":[]}
/v1/school/removeEmployee/{userId}
application/json
GET/POST
参数 必选 类型 说明 RequestBody userId 是 int 员工userId access_token 是 string 用户鉴权码
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/school/removeEmployee/12?access_token=xxxx
Response
{"status":200,"message":"\u64cd\u4f5c\u6210\u529f","data":[]}
/v1/school/employeeList
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 page 否 int 当前页数 pageSize 否 int 页码 q 否 string 关键字搜索
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/school/employeeList
Response
{"status":200,"data":{"total_page":1,"page":1,"pagesize":20,"total_record":"1","record":[{"userId":"12","username":"zhangsan","userType":"35","mobile":"18675577005","trueName":"\u5f20\u4e09","nickName":"\u5f20\u4e09","avatar":"http:\/\/www.baidu.com\/icon.png"}]}}
/v1/school/employeeChangePwd/{userId}
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 password 是 string 密码
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/school/employeeChangePwd/12?access_token=xxx
Response
{"status":200,"message":"\u64cd\u4f5c\u6210\u529f","data":[]}
/v1/school/repairEmployee/{userId}
application/json
GET/POST
参数 必选 类型 说明 RequestBody userId 是 int 员工userId access_token 是 string 用户鉴权码
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/school/repairEmployee/12?access_token=xxxx
Response
{"status":200,"message":"\u64cd\u4f5c\u6210\u529f","data":[]}
/v1/school/personList/{userType}
application/json
GET/POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 page 否 int 页数 pageSize 否 int 页码 q 否 string 搜索关键字 roleType 否 int 类型: 讲师: 1. 自由讲师 2. 签约讲师 学员:0.游客 1. 注册学员 2.付费学员 3.vip学员 accountStatus 否 int 讲师认证状态: 0.未认证 1.已认证 city 否 string 城市:如成都
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/school/personList/2?access_token=xxx
Response
{"status":200,"data":{"total_page":1,"page":1,"pagesize":20,"total_record":"1","record":[{"userId":"3","accountStatus":"1","userName":"18675577001","mobile":"","code":"86028000000003","roleType":"1","expireDate":null,"expertRank":"0","creationDate":"2018-10-13 17:34:03","authenDate":"2018-10-15 14:44:45","nickName":"\u7231\u5439\u98ce\u7684\u8349\u513f","trueName":"\u5f20\u4e09","sex":"0","faceIn":null,"address":null,"schId":null,"avatar":"\/widgets\/assets\/images\/pic-b.png","activeAmount":"0","grades":[],"subjects":[],"nodes":[],"fans":1,"courseCounts":0}]}}
/v1/school/extendList/{userId}
application/json
GET/POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 page 否 int 页数 pageSize 否 int 页码
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/school/extendList/3?access_token=xxx
Response
{"status":200,"data":{"total_fee":0,"today_amount":0,"total_amount":0,"total_page":1,"page":"1","pagesize":"20","total_record":1,"total_second_record":1,"username":"18675577001","nickName":"\u7231\u5439\u98ce\u7684\u8349\u513f","record":[{"userId":"4","username":"18675577023","nickName":"18675577023","avatar":"\/widgets\/assets\/images\/pic-b.png","totalFee":0,"shareAmount":0,"nextPersonCount":1}]}}
/v1/school/nextPersonList/{userId}
application/json
GET/POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 page 否 int 页数 pageSize 否 int 页码
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/school/nextPersonList/4?access_token=xxx
Response
{"status":200,"data":{"total_page":1,"page":"1","pagesize":"20","total_record":1,"record":[{"userId":"5","username":"18675577003","nickName":"18675577003","trueName":"18675577003","avatar":"\/widgets\/assets\/images\/pic-b.png","totalFee":0,"shareAmount":0,"nextPersonCount":0}]}}
/v1/school/repairAccount/{access_token}
application/json
POST
参数 必选 类型 说明 PathParam access_token 是 String 授权签名(用户登陆成功返回的access_token) RequestBody uId 是 int 用户userId
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | Array | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d {"access_token":"xxxxx"} http://web.higoee.com/v1/school/repairAccount/{access_token}
Response
{"status": 200,"message": "操作成功"}
/v1/finance/statistics
application/json
GET/POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/finance/statistics
Response
{
"status": 200,
"data": {
"todaySaleFee": "8.00", // 今日销售额
"totalSaleFee": "8.00", // 累计销售额
"todayRechargeFee": "10.00", // 今日充值
"todayWithdrawalsFee": "5.00" // 今日提现
}
}
/v1/finance/saleOrderList
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 POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/finance/saleOrderList
Response
{
"status": 200,
"data": {
"total_page": 4,
"page": "1",
"pagesize": "1",
"total_record": 4,
"total_amount": "8.00",
"record": [
{
"orderId": "15",
"orderName": "积分购买课件测试22",
"outTradeNo": "1056624006201810181150469194",
"orderNo": "1056624006201810181150469194",
"orderType": "course",
"payMode": "WALLET",
"totalFee": "2.00",
"originalFee": "2.00",
"platformIncomeFee": "1.20",
"businessIncomeFee": "0.80",
"payStatus": "2",
"tradeType": "APP",
"userId": "5",
"productId": "79080a09-5147-417d-b0b6-23a8cddf29dc",
"payDate": "2018-10-18 11:50:46",
"businessUserId": "4",
"business": "丁红艳",
"creationDate": "2018-10-18 11:50:46",
"username": "18675577003",
"nickName": "18675577003",
"trueName": "18675577003"
}
],
}
}
/v1/finance/orderAccessList/{type}
application/json
POST
参数 必选 类型 说明 RequestBody type 是 int 业务类型: 1.充值 2. 提现 access_token 是 string 用户鉴权码 page 否 int 页数,默认1 pageSize 否 int 页码,默认20 order 否 String 排序:orderId desc q 否 String 关键字搜索 payStatus 否 int 支付状态: 1.下单成功(未支付) 2.已支付 startTime 否 String 开始时间 endTime 否 String 结束时间
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/finance/orderAccessList/1
Response
{
"status": 200,
"data": {
"total_page": 0,
"page": "1",
"pagesize": "20",
"total_record": 0,
"total_amount": null,
"record": [
{
"orderId": "8",
"orderName": "购买1000积分",
"outTradeNo": "1709360186201810172046324578",
"orderNo": "1709360186201810453233234562",
"orderTrend": "RECHARGE",
"payMode": "ALIPAY_APPPAY",
"totalFee": "10.00",
"originalFee": "10.00",
"payStatus": "2",
"tradeType": "APP",
"userId": "13",
"label": "支付宝",
"productId": "79080a09-5147-417d-b0b6-23a8cddf29dc",
"otherId": null,
"payDate": "2018-10-17 20:55:19",
"creationDate": "2018-10-17 20:46:32",
"username": "18675577006",
"nickName": "18675577006",
"trueName": "18675577006"
}
],
}
}
/v1/marketing/statistics
application/json
GET/POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/marketing/statistics
Response
{
"status": 200,
"data": {
"todayNewPromoters": 1, // 今日新增代理
"todayNewMembers": 1, // 今日新增成员
"preferentingCounts": 0, // 正在优惠课程
"todayPromoterFee": "0.03" // 今日代理收益
}
}
/v1/marketing/promoterList
application/json
GET/POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 page 否 int 页数 pageSize 否 int 页码 order 否 String 排序:acc.userId desc q 否 String 关键字搜索 city 否 String 城市筛选 startTime 否 String 开始时间 endTime 否 String 结束时间
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/marketing/promoterList?access_token=xxx
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": "1",
"pagesize": "20",
"total_record": "1",
"record": [
{
"userId": "4",
"username": "18675577023",
"userType": "1",
"roleType": "1",
"nickName": "18675577023",
"address": "成都",
"trueName": "18675577023",
"avatar": "/widgets/assets/images/pic-b.png",
"promoterDate": "2018-10-17 15:20:57",
"teamMembers": 4, // 团队成员
"rechargeFee": "10.00", // 团队充值
"promoterFee": "0.26" // 代理收益
}
],
}
}
/v1/marketing/extendList/{userId}
application/json
GET/POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 page 否 int 页数 pageSize 否 int 页码 q 否 String 关键字搜索
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/marketing/extendList/4?access_token=xxx
Response
{
"status": 200,
"data": {
"total_fee": "10.00", // 充值总额
"today_amount": "0.26", // 今日分润
"total_amount": "0.26", // 累计分润
"total_page": 1,
"page": "1",
"pagesize": "20",
"total_record": 1, // 一级团队成员
"total_second_record": 1, // 二级团队成员
"username": "18675577023", // 帐号
"nickName": "18675577023", // 昵称
"trueName": "18675577003", // 姓名
"record": [
{
"userId": "5",
"username": "18675577003",
"nickName": "18675577003",
"trueName": "18675577003",
"avatar": "/widgets/assets/images/pic-b.png",
"totalFee": "10.00", // 充值总额
"shareAmount": "0.25", // 贡献利润
"nextPersonCount": 1 // 下级成员个数
}
],
}
}
/v1/marketing/nextPersonList/{userId}
application/json
GET/POST
参数 必选 类型 说明 RequestBody access_token 是 string 用户鉴权码 page 否 int 页数 pageSize 否 int 页码
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" -d http://web.higoee.com/v1/marketing/nextPersonList/4?access_token=xxx
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": "1",
"pagesize": "20",
"total_record": 1,
"record": [
{
"userId": "13",
"username": "18675577006",
"nickName": "18675577006",
"trueName": "18675577006",
"avatar": "/widgets/assets/images/pic-b.png",
"totalFee": "10.00", // 充值总额
"shareAmount": "0.01", // 贡献利润
"nextPersonCount": 0 // 下级成员个数
}
],
}
}
/v1/city/list
application/json
POST/GET
参数 必选 类型 说明 RequestBody keyword 否 string 搜索关键词
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 状态码 |
data | array | 当前提交的内容 |