robot_wiki/library/002-文档示范/001-通用API接口文档示例.md

56 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 客户日志流水接口示例
>维护人员:**Tevin**
>创建时间2016-04-06
## 接口简介
实时查询客户各种操作(例如登录,拓客等)的流水日志
## 接口详情
### 请求地址
/api/customer-flow
### 请求类型
GET
### 请求参数
| 参数名 | 类型 | 必填 | 描述 | 默认值 | 参考值 |
| --- | :---: | :---: | --- | --- | --- |
| customer_id | number | 是 | 客户id | - | 132 |
| type | number | 否 | 客户类型0所有、1扩展、2报备、3成交 | - | 1 |
### 返回正确JSON示例
```javascript
{
"state": {
"code": 10200,
"msg": "ok"
},
"data": {
"id": 307, //流水id
"real_name": "Tevin", //用户名称
"mobile": "暂无", //用户手机
"origin": "暂无", //用户来源
"created_at": "2016-04-04 20:00:00", //加入时间
"last_login": "2016-05-22 15:30:21", //最后登录时间
"log": [] //日志列表
}
}
```
### 返回错误JSON示例
```javascript
{
"state": {
"code": 10500
"msg": "服务器未知报错"
}
}
```
### 备注说明
### 修改日志
- 【2016-05-22】
新增了last_login最后登录时间字段