折扣信息
金色童年
商品金额的折扣
Method and URL Structure
| Method |
Resource URL |
| PUT |
/market/product/discount/${product pk}/ |
Request Paramaters
| Name |
Description |
Required |
Defalut |
| quantity |
数量 |
YES |
|
Request Data
{ 'quantity': 1}
cURL Example
curl -X POST -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\--data '{...}' http://localhost/product/discount/12344/
Response
{ "discount":100.0, "amount":693.0, "real_amount":593.0, "point":10000}
购物车金额的折扣
Method and URL Structure
| Method |
Resource URL |
| PUT |
/market/cart/discount/ |
cURL Example
curl -X POST -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\--data '{...}' http://localhost/cart/discount/
Response
{ "discount":100.0, "amount":693.0, "real_amount":593.0, "point":10000}