PUT api/Vouchers/CheckVoucher/{voucherCode}/{visitDate}
Allows a voucher to be checked against a list of products, to check if a discount can be applied to the price of the products.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| voucherCode |
The code of the voucher to check. |
string |
Required |
| visitDate |
The date to apply the discount for. |
date |
None. |
Body Parameters
The list of products to be checked against.
Collection of ObjectNone.
Request Formats
application/json, text/json
Sample:
[{"ProductCode":"","Price":0.0,"Quantity":0}]
application/xml, text/xml
Sample:
<?xml version="1.0" encoding="utf-16"?>
<VoucherProducts xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<APIVoucherProduct>
<ProductCode />
<Price>0</Price>
<Quantity>0</Quantity>
</APIVoucherProduct>
</VoucherProducts>
Response Information
Resource Description
HttpResponseMessage| Name | Description | Type | Additional information |
|---|---|---|---|
| Version | Version |
None. |
|
| Content | HttpContent |
None. |
|
| StatusCode | HttpStatusCode |
None. |
|
| ReasonPhrase | string |
None. |
|
| Headers | Collection of Object |
None. |
|
| RequestMessage | HttpRequestMessage |
None. |
|
| IsSuccessStatusCode | boolean |
None. |
Response Formats
application/json, text/json
Sample:
{"VoucherCode":"001","DiscountValue":10.50}
application/xml, text/xml
Sample:
<?xml version="1.0" encoding="utf-16"?> <VoucherCheckResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <VoucherCode>001</VoucherCode> <DiscountValue>10.50</DiscountValue> </VoucherCheckResponse>