代理商
橙旭园儿童编程
代理商信息
Method and URL Structure
Method |
Method Resource URL |
Descriptions |
Authentications Required |
GET |
/server/agents/info/ |
代理商信息 |
YES |
Requet Parameters
Name |
Description |
Required |
Default |
username |
用户名 |
NO |
|
cURL Example
curl -H 'Authorization: Token db4b5deed80091404ec2a295076221cf1f814b3e' http://127.0.0.1:8000/server/agents/info/?username=12345678910
Reponse Data
Name |
Description |
name |
名字 |
qrcode_url |
二维码 |
hits |
访问次数 |
order_count |
购卖数量 |
listen_record_count |
试听数量 |
Response
{
"pk":7,
"name":"代理商名字",
"number":"8a8256fa8528b69b.ba17f2",
"hits": "30",
"order_count":10,
"listen_record_count":10,
"qrcode_url":"https://static1.bcjiaoyu.com/agent-qrcode-4cef984978fa2dcfc29ca54f6d9ffb1e-8a8256fa8528b69b.ba17f2.png"
}
增加访问次数
Method and URL Structure
Method |
Method Resource URL |
Descriptions |
Authentications Required |
PUT |
/server/agents/hit/${number}/ |
增加访问次数 |
YES |
cURL Example
curl -X PUT http://127.0.0.1:8000/server/agents/hit/8a8256fa8528b69b.ba17f2/
Reponse Data
Name |
Description |
name |
名字 |
qrcode_url |
二维码 |
hits |
访问次数 |
order_count |
购卖数量 |
listen_record_count |
试听数量 |
Response
{
"pk":7,
"name":"代理商名字",
"number":"8a8256fa8528b69b.ba17f2",
"hits": 30,
"order_count":10,
"listen_record_count":10,
"qrcode_url":"https://static1.bcjiaoyu.com/agent-qrcode-4cef984978fa2dcfc29ca54f6d9ffb1e-8a8256fa8528b69b.ba17f2.png"
}
记录
Method and URL Structure
Method |
Method Resource URL |
Descriptions |
Authentications Required |
GET |
/server/agents/record/orders/ |
定单记录 |
YES |
GET |
/server/agents/record/listen/ |
试听记录 |
YES |
cURL Example
curl -H 'Authorization: Token db4b5deed80091404ec2a295076221cf1f814b3e' http://127.0.0.1:8000/server/agents/record/orders/
Reponse Data
Name |
Description |
username |
用户名 |
Response
{
"count":22,
"next":"/server/agents/record/orders/?page=2",
"previous":null,
"results":[ {
"username": "12345678910"
}... ]
}