| PUT | /Coupons/Activate |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CouponType | body | int | Yes | |
| Prefix | body | string | Yes | |
| ActivateId | body | Guid | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No | |
| Result | form | Coupon | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Code | form | string | No | |
| CouponType | form | int | No | |
| ExpirationDate | form | DateTime | No | |
| Voided | form | bool | No | |
| Used | form | bool | No | |
| UseTime | form | DateTime? | No | |
| Data | form | CouponData | No | |
| CouponStatus | form | int? | No | |
| ActivateId | form | Guid? | No | |
| SpendId | form | Guid? | No | |
| CheckSumFrom | form | decimal? | No | |
| CheckSumTo | form | decimal? | No | |
| DiscountAmountLimit | form | decimal? | No | |
| DiscountSumLimit | form | decimal? | No | |
| SingleCouponPerCheck | form | int? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Prods | form | List<CouponProd> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ProdId | form | string | No | |
| IsService | form | int | No | |
| Type | form | int | No | |
| SCount | form | decimal | No | |
| ValueType | form | int | No | |
| Value | form | decimal | No | |
| SCountAdditive | form | decimal | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .wire suffix or ?format=wire
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /Coupons/Activate HTTP/1.1
Host: 10.10.0.107
Accept: application/x-wire
Content-Type: application/x-wire
Content-Length: length
{"CouponType":0,"Prefix":"String","ActivateId":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: application/x-wire
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Result":{"Id":0,"Code":"String","CouponType":0,"ExpirationDate":"\/Date(-62135596800000-0000)\/","Voided":false,"Used":false,"UseTime":"\/Date(-62135596800000-0000)\/","Data":{"Prods":[{"ProdId":"String","IsService":0,"Type":0,"SCount":0,"ValueType":0,"Value":0,"SCountAdditive":0}]},"CouponStatus":0,"ActivateId":"00000000000000000000000000000000","SpendId":"00000000000000000000000000000000","CheckSumFrom":0,"CheckSumTo":0,"DiscountAmountLimit":0,"DiscountSumLimit":0,"SingleCouponPerCheck":0}}