POST api/Car/UseDiscount
使用折扣碼
Request Information
URI Parameters
None.
Body Parameters
UseDiscount_Input| Name | Description | Type | Additional information |
|---|---|---|---|
| Ticket |
身份票據 |
string |
Required |
| userId |
會員帳號 |
string |
Required |
| MShopID |
购物車商品ID |
globally unique identifier |
Required |
| discountCode |
折扣碼序號 |
string |
None. |
| couponId |
折價券ID |
string |
None. |
| forceOverride |
是否覆寫原有優惠 |
boolean |
None. |
Request Formats
application/json, text/json
Sample:
{
"Ticket": "sample string 1",
"userId": "sample string 2",
"MShopID": "01b2a9d7-e509-44d5-bd8c-ec8e12798b31",
"discountCode": "sample string 4",
"couponId": "sample string 5",
"forceOverride": true
}
text/html
Sample:
{"Ticket":"sample string 1","userId":"sample string 2","MShopID":"01b2a9d7-e509-44d5-bd8c-ec8e12798b31","discountCode":"sample string 4","couponId":"sample string 5","forceOverride":true}
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
使用折扣碼
UseDiscount_Output| Name | Description | Type | Additional information |
|---|---|---|---|
| ticketVerified |
驗證是否通過 |
boolean |
None. |
| status |
狀態 0 失敗 1 使用成功 2 未符合使用條件 3 其他商品已使用此優惠活動,確定要改此商品使用? 4 序號已使用 5 無效序號 6 此折價券已全數領取完畢 7 優惠活動只能擇一使用,確定要使用此優惠活動? |
integer |
None. |
| statusText |
狀態文字敘述 |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"ticketVerified": true,
"status": 2,
"statusText": "sample string 3"
}
text/html
Sample:
{"ticketVerified":true,"status":2,"statusText":"sample string 3"}