POST api/Coupon/Create
Request Information
URI Parameters
None.
Body Parameters
CreateCouponDtoName | Description | Type | Additional information |
---|---|---|---|
CouponName | string |
Required |
|
CouponDescription | string |
Required |
|
CouponShortDescription | string |
None. |
|
CouponLongDescription | string |
None. |
|
CouponImageLocation | string |
None. |
|
CouponImageID | Collection of integer |
None. |
|
CouponTypeID | integer |
Required |
|
CategoryId | integer |
None. |
|
CouponExpiryDate | date |
Required |
|
CouponStartDate | date |
Required |
|
CouponValue | decimal number |
Required |
|
CouponCode | string |
Required |
|
Rate | decimal number |
None. |
|
FlatAmount | decimal number |
None. |
|
RangeMin | decimal number |
None. |
|
RangeMax | decimal number |
None. |
|
ForEachAmount | decimal number |
None. |
|
LicenseNumber | string |
None. |
|
LicenseImageLocation | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "CouponName": "sample string 1", "CouponDescription": "sample string 2", "CouponShortDescription": "sample string 3", "CouponLongDescription": "sample string 4", "CouponImageLocation": "sample string 5", "CouponImageID": [ 1, 2 ], "CouponTypeID": 6, "CategoryId": 7, "CouponExpiryDate": "2025-06-15T07:05:18.7709482+03:00", "CouponStartDate": "2025-06-15T07:05:18.7709482+03:00", "CouponValue": 10.0, "CouponCode": "sample string 11", "Rate": 1.0, "FlatAmount": 1.0, "RangeMin": 1.0, "RangeMax": 1.0, "ForEachAmount": 1.0, "LicenseNumber": "sample string 12", "LicenseImageLocation": "sample string 13" }
application/xml, text/xml
Sample:
<CreateCouponDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/QatarPay.Features.CouponSystem.Models"> <CategoryId>7</CategoryId> <CouponCode>sample string 11</CouponCode> <CouponDescription>sample string 2</CouponDescription> <CouponExpiryDate>2025-06-15T07:05:18.7709482+03:00</CouponExpiryDate> <CouponImageID xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:int>1</d2p1:int> <d2p1:int>2</d2p1:int> </CouponImageID> <CouponImageLocation>sample string 5</CouponImageLocation> <CouponLongDescription>sample string 4</CouponLongDescription> <CouponName>sample string 1</CouponName> <CouponShortDescription>sample string 3</CouponShortDescription> <CouponStartDate>2025-06-15T07:05:18.7709482+03:00</CouponStartDate> <CouponTypeID>6</CouponTypeID> <CouponValue>10</CouponValue> <FlatAmount>1</FlatAmount> <ForEachAmount>1</ForEachAmount> <LicenseImageLocation>sample string 13</LicenseImageLocation> <LicenseNumber>sample string 12</LicenseNumber> <RangeMax>1</RangeMax> <RangeMin>1</RangeMin> <Rate>1</Rate> </CreateCouponDto>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ActionResponseName | Description | Type | Additional information |
---|---|---|---|
success | boolean |
None. |
|
code | string |
None. |
|
message | string |
None. |
|
errors | Collection of string |
None. |
Response Formats
application/json, text/json
Sample:
{ "success": true, "code": "sample string 2", "message": "sample string 3", "errors": [ "sample string 1", "sample string 2" ] }
application/xml, text/xml
Sample:
<ActionResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/QatarPay.Models"> <code>sample string 2</code> <errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </errors> <message>sample string 3</message> <success>true</success> </ActionResponse>