[关闭]
@chengxuyuan 2019-10-22T11:01:16.000000Z 字数 937 阅读 612

登录注册接口文档

销售系统


登录

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

  1. {
  2. "username": "001",
  3. "password":"123456"
  4. }

cURL Example

  1. curl -X PUT -H 'Content-Type: application/json' --data '{...}' http://127.0.0.1:8000/account/login/

Response

  1. {
  2. "token": "6b35c2ca12ebbaa4077bbafd6e2fe0d98f2596b7",
  3. "is_admin": false,
  4. "name": "小明",
  5. "is_leader": false
  6. }

退出登录

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
POST /crm/account/logout/ 退出登录 YES

cURL Example

  1. 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

  1. curl -X POST -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b' http://127.0.0.1:8000/account/logout_all/
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注