余额和余额充值
金色童年
获取余额详情
Method and URL Structure
Method |
Resource URL |
GET |
/market/balance_info/ |
Request Paramaters
No Applicatated
cURL Example
curl -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\ http://localhost/market/balance_info/
Response
{
"pk":19,
"amount":"9.00",
"created":"2016-10-31T19:03:38.727343"
}
余额充值
Method and URL Structure
Method |
Resource URL |
Descrtipion |
POST |
/market/recharge/ |
|
Request Data
Name |
Description |
Required |
Default |
amount |
金额 |
YES |
|
order_type |
类型 |
NO |
recharge |
Request
{
"amount":"33.0",
"order_type": "recharge",
}
cURL Example
curl -X POST -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\
-H 'Content-Type: Application/json' --data '{....}' http://localhost/market/recharge/
Response
{
"pk":19,
"amount":"42.00",
"created":"2016-10-31T19:03:38.727343"
}
充值记录
Method and URL Structure
Method |
Resource URL |
GET |
/market/recharge/log/ |
Request Paramaters
No Applicatated
cURL Example
curl -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\ http://localhost/market/recharge/log/
Response
{
"count":3,
"next":null,
"previous":null,
"results":[{
"pk":3,
"amount":"99.90",
"created":"2016-11-01T12:15:03.042222",
"extra":"rechare blance"
},..]
}