POST Discounts/Post/{SiteID}?PackageId={PackageId}
Post to create Discount
Request Information
URI Parameters
| Name | Type | Description | Additional information |
|---|---|---|---|
| SiteID | integer | ||
| PackageId | integer |
Optional: leave null and the method Package/GetLatestPackageForSite will be used to determine packageid |
None. |
Body Parameters
PostDiscountModel| Name | Type | Description | Additional information |
|---|---|---|---|
| CMReasonID | integer |
Reason for Discount. See Get Reason Types. |
|
| Name | string |
Discount name. This will show on the Transaction and Reports. |
|
| Amount | decimal number |
Discount Amount. |
|
| PromptText | string | ||
| IsDiscountByPercentage | boolean |
True: Amount is Percentage. False: Amount is whole number. |
|
| IsManagerOverride | boolean |
Used to set if Manager permissions are required. |
|
| IsApplyToOptions | boolean |
Used to set if Discount should apply to Options or only full Items. |
|
| IsMustHaveItemsSelected | boolean |
Used to set if items must be selected before discount is applied. If not; All items on the Transaction are discounted. |
|
| IsPromptForReason | boolean |
Used to set if Reason prompt should show on every trigger of the discount. |
|
| IncludedProducts | string |
Used to specify which Products discount can be applied to. CSV List. |
|
| MaxCovers | integer |
Used to set if Discount should apply if Transaction exceeds cover count. |
|
| TriggerBarcode | string |
Used to set barcode value to trigger the Discount through a barcode scan. |
|
| StartDate | datetime |
Start Date from which Discount can be applied. |
|
| EndDate | datetime |
End Date at which Discount can no longer be applied. |
|
| PriceGroupIDs | string |
Price Group IDs for which Discount can apply to. If none set, applies to all Price Groups. |
|
| ApplyIfBestDiscount | boolean |
Used to set priority if more than one Discount is being applied. |
|
| MaxValue | decimal number |
Used to set Maximum Discount value which applying Discount will not exceed. |
|
| StockCode | string |
Stock Code used for Reporting and Stock. |
|
| ShortName | string |
Short name used on bills and receipts. |
|
| Quantity | integer |
Used to set how many of the discount should be applied. |
|
| DiscountSchedule | Collection of PostDiscountSchedule |
List of schedules (day of the week) when Promotion should trigger. |
Request Formats
application/json, text/json
{
"CMReasonID": 1,
"Name": "sample string 2",
"Amount": 3.0,
"PromptText": "sample string 4",
"IsDiscountByPercentage": true,
"IsManagerOverride": true,
"IsApplyToOptions": true,
"IsMustHaveItemsSelected": true,
"IsPromptForReason": true,
"IncludedProducts": "sample string 10",
"MaxCovers": 11,
"TriggerBarcode": "sample string 12",
"StartDate": "2026-10-10T23:19:08.681447",
"EndDate": "2026-10-10T23:19:08.681447",
"PriceGroupIDs": "sample string 15",
"ApplyIfBestDiscount": true,
"MaxValue": 17.0,
"StockCode": "sample string 18",
"ShortName": "sample string 19",
"Quantity": 20,
"DiscountSchedule": [
{
"Weekday": 1,
"StartTime": "00:00:00.1234567",
"EndTime": "00:00:00.1234567"
},
{
"Weekday": 1,
"StartTime": "00:00:00.1234567",
"EndTime": "00:00:00.1234567"
}
]
}
application/xml, text/xml
System.Xml.XmlDocument
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
tblCMDiscount| Name | Type | Description | Additional information |
|---|---|---|---|
| CMDiscountID | integer |
None. |
|
| CMPackageID | integer |
None. |
|
| CMReasonID | integer |
None. |
|
| Name | string |
None. |
|
| Amount | decimal number |
None. |
|
| PromptText | string |
None. |
|
| IsDiscountByPercentage | boolean |
None. |
|
| IsManagerOverride | boolean |
None. |
|
| IsApplyToOptions | boolean |
None. |
|
| IsMustHaveItemsSelected | boolean |
None. |
|
| IsPromptForReason | boolean |
None. |
|
| IncludedProducts | string |
None. |
|
| AvailableThroughTevalisAPI | boolean |
None. |
|
| MaxCovers | integer |
None. |
|
| TriggerBarcode | string |
None. |
|
| StartDate | datetime |
None. |
|
| EndDate | datetime |
None. |
|
| PriceGroupIDs | string |
None. |
|
| ApplyIfBestDiscount | boolean |
None. |
|
| CostPricePlusPercentage | boolean |
None. |
|
| MaxValue | decimal number |
None. |
|
| UseOriginalGrossForServiceCharge | boolean |
None. |
|
| StockCode | string |
None. |
|
| ShortName | string |
None. |
|
| Quantity | integer |
None. |
|
| PreventOtherDiscounts | boolean |
None. |
|
| PreventOtherPromotions | boolean |
None. |
|
| tblCMDiscountSchedules | Collection of tblCMDiscountSchedule |
None. |
|
| tblCMDiscountExcludedFromPackageSites | Collection of tblCMDiscountExcludedFromPackageSite |
None. |
Response Formats
application/json, text/json
{
"CMDiscountID": 1,
"CMPackageID": 2,
"CMReasonID": 1,
"Name": "sample string 4",
"Amount": 5.0,
"PromptText": "sample string 6",
"IsDiscountByPercentage": true,
"IsManagerOverride": true,
"IsApplyToOptions": true,
"IsMustHaveItemsSelected": true,
"IsPromptForReason": true,
"IncludedProducts": "sample string 12",
"AvailableThroughTevalisAPI": true,
"MaxCovers": 14,
"TriggerBarcode": "sample string 15",
"StartDate": "2026-10-10T23:19:08.7134837",
"EndDate": "2026-10-10T23:19:08.7134837",
"PriceGroupIDs": "sample string 18",
"ApplyIfBestDiscount": true,
"CostPricePlusPercentage": true,
"MaxValue": 21.0,
"UseOriginalGrossForServiceCharge": true,
"StockCode": "sample string 23",
"ShortName": "sample string 24",
"Quantity": 25,
"PreventOtherDiscounts": true,
"PreventOtherPromotions": true,
"tblCMDiscountSchedules": [
{
"CMDiscountScheduleID": 1,
"CMDiscountID": 1,
"Weekday": 3,
"StartTime": "00:00:00.1234567",
"EndTime": "00:00:00.1234567"
}
],
"tblCMDiscountExcludedFromPackageSites": [
{
"CMDiscountExcludedFromPackageSiteID": 1,
"CMDiscountID": 1,
"CMSiteID": 1,
"CMPackageID": 1
}
]
}
application/xml, text/xml
System.Xml.XmlDocument