POST CMPromotions?SiteID={SiteID}&PackageId={PackageId}
Returns All Promotions From The Site
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
PostCMPromoModelName | Type | Description | Additional information |
---|---|---|---|
Name | string |
None. |
|
PromoType | EnumCMPromotionType |
None. |
|
Value | decimal number |
None. |
|
FirePriority | integer |
None. |
|
CMPriceGroupID | integer |
None. |
|
StartDate | date |
None. |
|
EndDate | date |
None. |
|
CMPromoGroupModels | Collection of PostCMPromoGroupModel |
None. |
|
CMPromoGroupSchedules | Collection of PostCMPromoScheduleModel |
None. |
Request Formats
application/json, text/json
Sample:
{ "Name": "sample string 1", "PromoType": 0, "Value": 2.1, "FirePriority": 3, "CMPriceGroupID": 1, "StartDate": "2025-02-20T19:22:51.8722509+00:00", "EndDate": "2025-02-20T19:22:51.8722509+00:00", "CMPromoGroupModels": [ { "IsInput": true, "TriggerQty": 2, "ActionValue": 3.1, "CMPromoGroupProducts": [ { "CMProductMeasureID": 1 }, { "CMProductMeasureID": 1 } ] }, { "IsInput": true, "TriggerQty": 2, "ActionValue": 3.1, "CMPromoGroupProducts": [ { "CMProductMeasureID": 1 }, { "CMProductMeasureID": 1 } ] } ], "CMPromoGroupSchedules": [ { "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
Sample:
<PostCMPromoModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Tevalis.API.App.Models"> <CMPriceGroupID>1</CMPriceGroupID> <CMPromoGroupModels> <PostCMPromoGroupModel> <ActionValue>3.1</ActionValue> <CMPromoGroupProducts> <PostCMPromoGroupProductModel> <CMProductMeasureID>1</CMProductMeasureID> </PostCMPromoGroupProductModel> <PostCMPromoGroupProductModel> <CMProductMeasureID>1</CMProductMeasureID> </PostCMPromoGroupProductModel> </CMPromoGroupProducts> <IsInput>true</IsInput> <TriggerQty>2</TriggerQty> </PostCMPromoGroupModel> <PostCMPromoGroupModel> <ActionValue>3.1</ActionValue> <CMPromoGroupProducts> <PostCMPromoGroupProductModel> <CMProductMeasureID>1</CMProductMeasureID> </PostCMPromoGroupProductModel> <PostCMPromoGroupProductModel> <CMProductMeasureID>1</CMProductMeasureID> </PostCMPromoGroupProductModel> </CMPromoGroupProducts> <IsInput>true</IsInput> <TriggerQty>2</TriggerQty> </PostCMPromoGroupModel> </CMPromoGroupModels> <CMPromoGroupSchedules> <PostCMPromoScheduleModel> <EndTime>PT0.1234567S</EndTime> <StartTime>PT0.1234567S</StartTime> <Weekday>1</Weekday> </PostCMPromoScheduleModel> <PostCMPromoScheduleModel> <EndTime>PT0.1234567S</EndTime> <StartTime>PT0.1234567S</StartTime> <Weekday>1</Weekday> </PostCMPromoScheduleModel> </CMPromoGroupSchedules> <EndDate>2025-02-20T19:22:51.8722509+00:00</EndDate> <FirePriority>3</FirePriority> <Name>sample string 1</Name> <PromoType>BuyXGetYFree</PromoType> <StartDate>2025-02-20T19:22:51.8722509+00:00</StartDate> <Value>2.1</Value> </PostCMPromoModel>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
tblCMPromoName | Type | Description | Additional information |
---|---|---|---|
CMPromoID | integer |
None. |
|
CMCompanyGroupID | integer |
None. |
|
Name | string |
None. |
|
CreateDate | date |
None. |
|
StartDate | date |
None. |
|
EndDate | date |
None. |
|
PromoType | integer |
None. |
|
Value | decimal number |
None. |
|
Active | boolean |
None. |
|
TableRule | string |
None. |
|
PackageID | integer |
None. |
|
FirePriority | integer |
None. |
|
SendActToHetras | boolean |
None. |
|
ImageFileName | string |
None. |
|
ImageSaveDate | date |
None. |
|
AffectMacroChildren | boolean |
None. |
|
ExclusionDates | string |
None. |
|
CancelAfterPromoEnd | boolean |
None. |
|
PLU | string |
None. |
|
PromoConfigJson | string |
None. |
|
StockCode | string |
None. |
|
tblCMPromoGroups | Collection of tblCMPromoGroup |
None. |
|
tblCMPromoSchedules | Collection of tblCMPromoSchedule |
None. |
|
tblCMPromoExcludedFromPackageSiteIDs | Collection of tblCMPromoExcludedFromPackageSiteID |
None. |
|
tblCMPromoPriceGroups | Collection of tblCMPromoPriceGroup |
None. |
|
tblCMKioskPromoConfigs | Collection of tblCMKioskPromoConfig |
None. |
Response Formats
application/json, text/json
Sample:
{ "CMPromoID": 1, "CMCompanyGroupID": 1, "Name": "sample string 3", "CreateDate": "2025-02-20T19:22:51.8879185+00:00", "StartDate": "2025-02-20T19:22:51.8879185+00:00", "EndDate": "2025-02-20T19:22:51.8879185+00:00", "PromoType": 7, "Value": 8.1, "Active": true, "TableRule": "sample string 10", "PackageID": 1, "FirePriority": 12, "SendActToHetras": true, "ImageFileName": "sample string 14", "ImageSaveDate": "2025-02-20T19:22:51.8879185+00:00", "AffectMacroChildren": true, "ExclusionDates": "sample string 16", "CancelAfterPromoEnd": true, "PLU": "sample string 18", "PromoConfigJson": "sample string 19", "StockCode": "sample string 20", "tblCMPromoGroups": [ { "CMPromoGroupID": 1, "CMPromoID": 1, "CreateDate": "2025-02-20T19:22:51.9044716+00:00", "IsInput": true, "TriggerQty": 5, "ActionValue": 6.1, "IsActive": true, "PromoBuilderConfig": "sample string 8", "tblCMPromoGroupProducts": [ { "CMPromoGroupProductID": 1, "CMPromoGroupID": 1, "CMProductMeasureID": 1, "CreateDate": "2025-02-20T19:22:51.9050464+00:00", "AddOnPrice": 5.0, "ShowInPromoBuilder": true } ] } ], "tblCMPromoSchedules": [ { "CMPromoScheduleID": 1, "CMPromoID": 1, "CreateDate": "2025-02-20T19:22:52.5410301+00:00", "Weekday": 4, "StartTime": "00:00:00.1234567", "EndTime": "00:00:00.1234567" } ], "tblCMPromoExcludedFromPackageSiteIDs": [ { "CMPromoExcludedFromPackageSiteID": 1, "CMPromoID": 1, "CMPackageSiteLinkID": 1, "CMPackageID": 1 } ], "tblCMPromoPriceGroups": [ { "CMPromoPriceGroupID": 1, "CMPromoID": 1, "CMPriceGroupID": 1 } ], "tblCMKioskPromoConfigs": [ { "CMKioskPromoConfigID": 1, "CMPromoID": 1, "CustomerPrompt": "sample string 3", "Action": "sample string 4", "YesText": "sample string 5", "YesForeground": "sample string 6", "YesBackground": "sample string 7", "NoText": "sample string 8", "NoForeground": "sample string 9", "NoBackground": "sample string 10", "Order": 11 } ] }
application/xml, text/xml
Sample:
<tblCMPromo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Tevalis.CM.DAL"> <CMPromoID>1</CMPromoID> <CMCompanyGroupID>1</CMCompanyGroupID> <Name>sample string 3</Name> <CreateDate>2025-02-20T19:22:51.8879185+00:00</CreateDate> <StartDate>2025-02-20T19:22:51.8879185+00:00</StartDate> <EndDate>2025-02-20T19:22:51.8879185+00:00</EndDate> <PromoType>7</PromoType> <Value>8.1</Value> <Active>true</Active> <TableRule>sample string 10</TableRule> <PackageID>1</PackageID> <FirePriority>12</FirePriority> <SendActToHetras>true</SendActToHetras> <ImageFileName>sample string 14</ImageFileName> <ImageSaveDate>2025-02-20T19:22:51.8879185+00:00</ImageSaveDate> <AffectMacroChildren>true</AffectMacroChildren> <ExclusionDates>sample string 16</ExclusionDates> <CancelAfterPromoEnd>true</CancelAfterPromoEnd> <PLU>sample string 18</PLU> <PromoConfigJson>sample string 19</PromoConfigJson> <StockCode>sample string 20</StockCode> <tblCMPromoGroups> <tblCMPromoGroup> <CMPromoGroupID>1</CMPromoGroupID> <CMPromoID>1</CMPromoID> <CreateDate>2025-02-20T19:22:51.9044716+00:00</CreateDate> <IsInput>true</IsInput> <TriggerQty>5</TriggerQty> <ActionValue>6.1</ActionValue> <IsActive>true</IsActive> <PromoBuilderConfig>sample string 8</PromoBuilderConfig> <tblCMPromoGroupProducts> <tblCMPromoGroupProduct> <CMPromoGroupProductID>1</CMPromoGroupProductID> <CMPromoGroupID>1</CMPromoGroupID> <CMProductMeasureID>1</CMProductMeasureID> <CreateDate>2025-02-20T19:22:51.9050464+00:00</CreateDate> <AddOnPrice>5</AddOnPrice> <ShowInPromoBuilder>true</ShowInPromoBuilder> </tblCMPromoGroupProduct> </tblCMPromoGroupProducts> </tblCMPromoGroup> </tblCMPromoGroups> <tblCMPromoSchedules> <tblCMPromoSchedule> <CMPromoScheduleID>1</CMPromoScheduleID> <CMPromoID>1</CMPromoID> <CreateDate>2025-02-20T19:22:52.5410301+00:00</CreateDate> <Weekday>4</Weekday> <StartTime>PT0.1234567S</StartTime> <EndTime>PT0.1234567S</EndTime> </tblCMPromoSchedule> </tblCMPromoSchedules> <tblCMPromoExcludedFromPackageSiteIDs> <tblCMPromoExcludedFromPackageSiteID> <CMPromoExcludedFromPackageSiteID>1</CMPromoExcludedFromPackageSiteID> <CMPromoID>1</CMPromoID> <CMPackageSiteLinkID>1</CMPackageSiteLinkID> <CMPackageID>1</CMPackageID> </tblCMPromoExcludedFromPackageSiteID> </tblCMPromoExcludedFromPackageSiteIDs> <tblCMPromoPriceGroups> <tblCMPromoPriceGroup> <CMPromoPriceGroupID>1</CMPromoPriceGroupID> <CMPromoID>1</CMPromoID> <CMPriceGroupID>1</CMPriceGroupID> </tblCMPromoPriceGroup> </tblCMPromoPriceGroups> <tblCMKioskPromoConfigs> <tblCMKioskPromoConfig> <CMKioskPromoConfigID>1</CMKioskPromoConfigID> <CMPromoID>1</CMPromoID> <CustomerPrompt>sample string 3</CustomerPrompt> <Action>sample string 4</Action> <YesText>sample string 5</YesText> <YesForeground>sample string 6</YesForeground> <YesBackground>sample string 7</YesBackground> <NoText>sample string 8</NoText> <NoForeground>sample string 9</NoForeground> <NoBackground>sample string 10</NoBackground> <Order>11</Order> </tblCMKioskPromoConfig> </tblCMKioskPromoConfigs> </tblCMPromo>