POST api/ms/voucher/create
Create (DiscountType "percent","cash")
Request Information
URI Parameters
None.
Body Parameters
m_voucher_createName | Description | Type | Additional information |
---|---|---|---|
Code | string |
String length: inclusive between 0 and 8 |
|
DiscountType | string |
Required String length: inclusive between 0 and 10 |
|
Discount | decimal number |
None. |
|
MinimumPrice | decimal number |
None. |
|
MaximumDiscount | decimal number |
None. |
|
BeginAt | date |
None. |
|
EndAt | date |
None. |
|
IsPrivate | boolean |
None. |
|
LimitUse | integer |
None. |
|
VoucherCustomerMapping | Collection of m_voucher_mappings |
None. |
Request Formats
application/json, text/json
Sample:
{ "Code": "sample string 1", "DiscountType": "sample string 2", "Discount": 3.0, "MinimumPrice": 1.0, "MaximumDiscount": 1.0, "BeginAt": "2024-11-21T16:42:12.9533786+07:00", "EndAt": "2024-11-21T16:42:12.9533786+07:00", "IsPrivate": true, "LimitUse": 1, "VoucherCustomerMapping": [ { "CustomerId": 1 }, { "CustomerId": 1 } ] }
application/xml, text/xml
Sample:
<m_voucher_create xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/KFA.Modules.Models.Mainsystem"> <BeginAt>2024-11-21T16:42:12.9533786+07:00</BeginAt> <Code>sample string 1</Code> <Discount>3</Discount> <DiscountType>sample string 2</DiscountType> <EndAt>2024-11-21T16:42:12.9533786+07:00</EndAt> <IsPrivate>true</IsPrivate> <LimitUse>1</LimitUse> <MaximumDiscount>1</MaximumDiscount> <MinimumPrice>1</MinimumPrice> <VoucherCustomerMapping> <m_voucher_mappings> <CustomerId>1</CustomerId> </m_voucher_mappings> <m_voucher_mappings> <CustomerId>1</CustomerId> </m_voucher_mappings> </VoucherCustomerMapping> </m_voucher_create>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.