@soszrg
2018-11-21T09:53:29.000000Z
字数 2822
阅读 357
anxin
http://121.40.214.215:8000
Authorization: token 1:d79be1d657d9a8b45f6f903620e84b06cbf225e0
登出接口(token)
接口地址
GET /api/v1/distributors/
请求示例
GET /api/v1/distributors/?page=1&page_size=10{}
请求参数说明
无
返回参数
{"meta":{"message":"info list","code":0},"data":{"count":1,"page_size":10,"next":null,"previous":null,"results":[{"id":14,"username":"zzzz","cellphone":"17612118938","email":"zr1231@126.com","updated_at":"2018-11-20T22:06:13","created_at":"2018-11-20T22:06:13","owner_id":12}]}}
返回参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| id | int | 客户id |
| username | string | 客户名 |
| cellphone | string | 客户手机号 |
| string | 客户邮箱 | |
| owner_id | int | 创建人id |
| updated_at | string | 更新时间 |
| created_at | string | 创建时间 |
接口地址
POST /api/v1/distributors/
请求示例
GET /api/v1/distributors/{"username":"zzzz","cellphone":"17612118938","email":"zr1231@126.com","password":"12345678"}
请求参数说明
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| username | string | Y | 客户名 |
| cellphone | string | N | 手机号 |
| string | N | 邮箱 | |
| password | string | Y | 初始密码(最少8位) |
返回参数
{"meta":{"code":0,"message":"distributor info"},"data":{"id":15,"username":"zzzzz","cellphone":"17612118958","email":"zrz1231@126.com","updated_at":"2018-11-21T09:33:19","created_at":"2018-11-21T09:33:19","owner_id":12}}
返回参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| id | int | 客户id |
| username | string | 客户名 |
| cellphone | string | 客户手机号 |
| string | 客户邮箱 | |
| owner_id | int | 创建人id |
| updated_at | string | 更新时间 |
| created_at | string | 创建时间 |
接口地址
GET /api/v1/distributors/[id]/
请求示例
GET /api/v1/distributors/15/{}
请求参数说明
无
返回参数
{"meta":{"code":0,"message":"distributor info"},"data":{"id":15,"username":"zzzzz","cellphone":"17612118958","email":"zrz1231@126.com","updated_at":"2018-11-21T09:33:19","created_at":"2018-11-21T09:33:19","owner_id":12}}
返回参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| id | int | 客户id |
| username | string | 客户名 |
| cellphone | string | 客户手机号 |
| string | 客户邮箱 | |
| owner_id | int | 创建人id |
| updated_at | string | 更新时间 |
| created_at | string | 创建时间 |
接口地址
PUT /api/v1/distributors/[15]/
请求示例
GET /api/v1/distributors/{"username":"zzzz","cellphone":"17612118938","email":"zr1231@126.com","password":"12345678"}
请求参数说明
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| username | string | Y | 客户名 |
| cellphone | string | N | 手机号 |
| string | N | 邮箱 | |
| password | string | Y | 初始密码(最少8位) |
返回参数
{"meta":{"code":0,"message":"distributor info"},"data":{"id":15,"username":"zzzzz","cellphone":"17612118958","email":"zrz1231@126.com","updated_at":"2018-11-21T09:33:19","created_at":"2018-11-21T09:33:19","owner_id":12}}
返回参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| id | int | 客户id |
| username | string | 客户名 |
| cellphone | string | 客户手机号 |
| string | 客户邮箱 | |
| owner_id | int | 创建人id |
| updated_at | string | 更新时间 |
| created_at | string | 创建时间 |
接口地址
DELETE /api/v1/distributors/[id]/
请求示例
DELETE /api/v1/distributors/15/{}
请求参数说明
无
返回参数
{"meta":{"code":0,"message":"delete[15:zzzzz] ok"},"data":{}}
返回参数说明
无
接口地址
GET /api/v1/distributors/names/
请求示例
GET /api/v1/distributors/?page=1&page_size=50{}
请求参数说明
无
返回参数
{"meta":{"message":"info list","code":0},"data":{"count":1,"page_size":50,"next":null,"previous":null,"results":[{"id":6,"username":"zzzz"}]}}
返回参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| id | int | 客户id |
| username | string | 客户名 |