登录注册接口文档
销售系统
登录
Method and URL Structure
| Method |
Method Resource URL |
Descriptions |
Authentications Required |
| POST |
/crm/account/login/ |
销售人员登录 |
NO |
Request Parameters
| Name |
Description |
Required |
Default |
| username |
工号 |
YES |
|
| password |
密码 |
YES |
|
Request Data
{ "username": "001", "password":"123456"}
cURL Example
curl -X PUT -H 'Content-Type: application/json' --data '{...}' http://127.0.0.1:8000/account/login/
Response
{ "token": "6b35c2ca12ebbaa4077bbafd6e2fe0d98f2596b7", "is_admin": false, "name": "小明", "is_leader": false}
退出登录
Method and URL Structure
| Method |
Method Resource URL |
Descriptions |
Authentications Required |
| POST |
/crm/account/logout/ |
退出登录 |
YES |
cURL Example
curl -X POST -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b' http://127.0.0.1:8000/account/logout/
退出所有登录
Method and URL Structure
| Method |
Method Resource URL |
Descriptions |
Authentications Required |
| POST |
/crm/account/logout_all/ |
退出所有登录 |
YES |
cURL Example
curl -X POST -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b' http://127.0.0.1:8000/account/logout_all/