Add lawyer information reporting interface and update routes
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
- `docs/smoke/README.md`
|
||||
- `docs/smoke/API.md`
|
||||
|
||||
## 律师信息上报接口
|
||||
|
||||
- `docs/lawyer/README.md`
|
||||
|
||||
## 配置
|
||||
|
||||
1. 复制 `.env.example` 为 `.env`。
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# 律师信息上报接口
|
||||
|
||||
该接口将律师线索数据写入 `lawyer` 库中的 `lawyer` 表(复用 `.env` 中的 `DB_INSTANCES=lawyer` 配置)。接口无需登录即可调用,调用方需自行做风控。
|
||||
|
||||
## POST `/api/v1/lawyers`
|
||||
|
||||
### 请求参数
|
||||
|
||||
| 字段 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `phone` | string, required | 手机号(会被去除首尾空格) |
|
||||
| `province` | string | 省份 |
|
||||
| `city` | string | 城市 |
|
||||
| `law_firm` | string | 职业律所 |
|
||||
| `url` | string | 律师详情页链接 |
|
||||
| `create_time` | int | 创建时间(Unix 时间戳,单位秒,不传则后端使用当前时间) |
|
||||
| `domain` | string | 来源站点标识 |
|
||||
| `name` | string | 律师姓名 |
|
||||
| `params` | string | 附加信息(例如 JSON 字符串) |
|
||||
|
||||
### 响应
|
||||
|
||||
成功:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"message": "success",
|
||||
"data": {
|
||||
"id": 146500
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
失败会返回对应的 HTTP 状态码以及 `code/message`。
|
||||
Reference in New Issue
Block a user