GET 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

None.

Response Information

Resource Description

CMPromoCatalogue
Name Type Description Additional information
SiteId integer

None.

PackageId integer

None.

CMPromo Collection of CMPromoModel

None.

Response Formats

application/json, text/json

Sample:
{
  "SiteId": 1,
  "PackageId": 2,
  "CMPromo": [
    {
      "CMPromoID": 1,
      "CMPackageID": 2,
      "Name": "sample string 3",
      "PromoType": 4,
      "Value": 5.1,
      "FirePriority": 6,
      "CMPriceGroupID": 1,
      "StartDate": "2024-11-21T06:23:55.8026861+00:00",
      "EndDate": "2024-11-21T06:23:55.8026861+00:00",
      "CMPromoGroupModels": [
        {
          "CMPromoGroupID": 1,
          "CMPromoID": 2,
          "IsInput": true,
          "TriggerQty": 4,
          "ActionValue": 5.1,
          "CMPromoGroupProducts": [
            {
              "CMPromoGroupProductID": 1,
              "CMPromoGroupID": 2,
              "CMProductMeasureID": 3
            },
            {
              "CMPromoGroupProductID": 1,
              "CMPromoGroupID": 2,
              "CMProductMeasureID": 3
            }
          ]
        },
        {
          "CMPromoGroupID": 1,
          "CMPromoID": 2,
          "IsInput": true,
          "TriggerQty": 4,
          "ActionValue": 5.1,
          "CMPromoGroupProducts": [
            {
              "CMPromoGroupProductID": 1,
              "CMPromoGroupID": 2,
              "CMProductMeasureID": 3
            },
            {
              "CMPromoGroupProductID": 1,
              "CMPromoGroupID": 2,
              "CMProductMeasureID": 3
            }
          ]
        }
      ],
      "CMPromoGroupSchedules": [
        {
          "CMPromoScheduleID": 1,
          "CMPromoID": 2,
          "Weekday": 3,
          "StartTime": "00:00:00.1234567",
          "EndTime": "00:00:00.1234567"
        },
        {
          "CMPromoScheduleID": 1,
          "CMPromoID": 2,
          "Weekday": 3,
          "StartTime": "00:00:00.1234567",
          "EndTime": "00:00:00.1234567"
        }
      ]
    },
    {
      "CMPromoID": 1,
      "CMPackageID": 2,
      "Name": "sample string 3",
      "PromoType": 4,
      "Value": 5.1,
      "FirePriority": 6,
      "CMPriceGroupID": 1,
      "StartDate": "2024-11-21T06:23:55.8026861+00:00",
      "EndDate": "2024-11-21T06:23:55.8026861+00:00",
      "CMPromoGroupModels": [
        {
          "CMPromoGroupID": 1,
          "CMPromoID": 2,
          "IsInput": true,
          "TriggerQty": 4,
          "ActionValue": 5.1,
          "CMPromoGroupProducts": [
            {
              "CMPromoGroupProductID": 1,
              "CMPromoGroupID": 2,
              "CMProductMeasureID": 3
            },
            {
              "CMPromoGroupProductID": 1,
              "CMPromoGroupID": 2,
              "CMProductMeasureID": 3
            }
          ]
        },
        {
          "CMPromoGroupID": 1,
          "CMPromoID": 2,
          "IsInput": true,
          "TriggerQty": 4,
          "ActionValue": 5.1,
          "CMPromoGroupProducts": [
            {
              "CMPromoGroupProductID": 1,
              "CMPromoGroupID": 2,
              "CMProductMeasureID": 3
            },
            {
              "CMPromoGroupProductID": 1,
              "CMPromoGroupID": 2,
              "CMProductMeasureID": 3
            }
          ]
        }
      ],
      "CMPromoGroupSchedules": [
        {
          "CMPromoScheduleID": 1,
          "CMPromoID": 2,
          "Weekday": 3,
          "StartTime": "00:00:00.1234567",
          "EndTime": "00:00:00.1234567"
        },
        {
          "CMPromoScheduleID": 1,
          "CMPromoID": 2,
          "Weekday": 3,
          "StartTime": "00:00:00.1234567",
          "EndTime": "00:00:00.1234567"
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<CMPromoCatalogue xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Tevalis.API.App.Models">
  <CMPromo>
    <CMPromoModel>
      <CMPackageID>2</CMPackageID>
      <CMPriceGroupID>1</CMPriceGroupID>
      <CMPromoGroupModels>
        <CMPromoGroupModel>
          <ActionValue>5.1</ActionValue>
          <CMPromoGroupID>1</CMPromoGroupID>
          <CMPromoGroupProducts>
            <CMPromoGroupProductModel>
              <CMProductMeasureID>3</CMProductMeasureID>
              <CMPromoGroupID>2</CMPromoGroupID>
              <CMPromoGroupProductID>1</CMPromoGroupProductID>
            </CMPromoGroupProductModel>
            <CMPromoGroupProductModel>
              <CMProductMeasureID>3</CMProductMeasureID>
              <CMPromoGroupID>2</CMPromoGroupID>
              <CMPromoGroupProductID>1</CMPromoGroupProductID>
            </CMPromoGroupProductModel>
          </CMPromoGroupProducts>
          <CMPromoID>2</CMPromoID>
          <IsInput>true</IsInput>
          <TriggerQty>4</TriggerQty>
        </CMPromoGroupModel>
        <CMPromoGroupModel>
          <ActionValue>5.1</ActionValue>
          <CMPromoGroupID>1</CMPromoGroupID>
          <CMPromoGroupProducts>
            <CMPromoGroupProductModel>
              <CMProductMeasureID>3</CMProductMeasureID>
              <CMPromoGroupID>2</CMPromoGroupID>
              <CMPromoGroupProductID>1</CMPromoGroupProductID>
            </CMPromoGroupProductModel>
            <CMPromoGroupProductModel>
              <CMProductMeasureID>3</CMProductMeasureID>
              <CMPromoGroupID>2</CMPromoGroupID>
              <CMPromoGroupProductID>1</CMPromoGroupProductID>
            </CMPromoGroupProductModel>
          </CMPromoGroupProducts>
          <CMPromoID>2</CMPromoID>
          <IsInput>true</IsInput>
          <TriggerQty>4</TriggerQty>
        </CMPromoGroupModel>
      </CMPromoGroupModels>
      <CMPromoGroupSchedules>
        <CMPromoScheduleModel>
          <CMPromoID>2</CMPromoID>
          <CMPromoScheduleID>1</CMPromoScheduleID>
          <EndTime>PT0.1234567S</EndTime>
          <StartTime>PT0.1234567S</StartTime>
          <Weekday>3</Weekday>
        </CMPromoScheduleModel>
        <CMPromoScheduleModel>
          <CMPromoID>2</CMPromoID>
          <CMPromoScheduleID>1</CMPromoScheduleID>
          <EndTime>PT0.1234567S</EndTime>
          <StartTime>PT0.1234567S</StartTime>
          <Weekday>3</Weekday>
        </CMPromoScheduleModel>
      </CMPromoGroupSchedules>
      <CMPromoID>1</CMPromoID>
      <EndDate>2024-11-21T06:23:55.8026861+00:00</EndDate>
      <FirePriority>6</FirePriority>
      <Name>sample string 3</Name>
      <PromoType>4</PromoType>
      <StartDate>2024-11-21T06:23:55.8026861+00:00</StartDate>
      <Value>5.1</Value>
    </CMPromoModel>
    <CMPromoModel>
      <CMPackageID>2</CMPackageID>
      <CMPriceGroupID>1</CMPriceGroupID>
      <CMPromoGroupModels>
        <CMPromoGroupModel>
          <ActionValue>5.1</ActionValue>
          <CMPromoGroupID>1</CMPromoGroupID>
          <CMPromoGroupProducts>
            <CMPromoGroupProductModel>
              <CMProductMeasureID>3</CMProductMeasureID>
              <CMPromoGroupID>2</CMPromoGroupID>
              <CMPromoGroupProductID>1</CMPromoGroupProductID>
            </CMPromoGroupProductModel>
            <CMPromoGroupProductModel>
              <CMProductMeasureID>3</CMProductMeasureID>
              <CMPromoGroupID>2</CMPromoGroupID>
              <CMPromoGroupProductID>1</CMPromoGroupProductID>
            </CMPromoGroupProductModel>
          </CMPromoGroupProducts>
          <CMPromoID>2</CMPromoID>
          <IsInput>true</IsInput>
          <TriggerQty>4</TriggerQty>
        </CMPromoGroupModel>
        <CMPromoGroupModel>
          <ActionValue>5.1</ActionValue>
          <CMPromoGroupID>1</CMPromoGroupID>
          <CMPromoGroupProducts>
            <CMPromoGroupProductModel>
              <CMProductMeasureID>3</CMProductMeasureID>
              <CMPromoGroupID>2</CMPromoGroupID>
              <CMPromoGroupProductID>1</CMPromoGroupProductID>
            </CMPromoGroupProductModel>
            <CMPromoGroupProductModel>
              <CMProductMeasureID>3</CMProductMeasureID>
              <CMPromoGroupID>2</CMPromoGroupID>
              <CMPromoGroupProductID>1</CMPromoGroupProductID>
            </CMPromoGroupProductModel>
          </CMPromoGroupProducts>
          <CMPromoID>2</CMPromoID>
          <IsInput>true</IsInput>
          <TriggerQty>4</TriggerQty>
        </CMPromoGroupModel>
      </CMPromoGroupModels>
      <CMPromoGroupSchedules>
        <CMPromoScheduleModel>
          <CMPromoID>2</CMPromoID>
          <CMPromoScheduleID>1</CMPromoScheduleID>
          <EndTime>PT0.1234567S</EndTime>
          <StartTime>PT0.1234567S</StartTime>
          <Weekday>3</Weekday>
        </CMPromoScheduleModel>
        <CMPromoScheduleModel>
          <CMPromoID>2</CMPromoID>
          <CMPromoScheduleID>1</CMPromoScheduleID>
          <EndTime>PT0.1234567S</EndTime>
          <StartTime>PT0.1234567S</StartTime>
          <Weekday>3</Weekday>
        </CMPromoScheduleModel>
      </CMPromoGroupSchedules>
      <CMPromoID>1</CMPromoID>
      <EndDate>2024-11-21T06:23:55.8026861+00:00</EndDate>
      <FirePriority>6</FirePriority>
      <Name>sample string 3</Name>
      <PromoType>4</PromoType>
      <StartDate>2024-11-21T06:23:55.8026861+00:00</StartDate>
      <Value>5.1</Value>
    </CMPromoModel>
  </CMPromo>
  <PackageId>2</PackageId>
  <SiteId>1</SiteId>
</CMPromoCatalogue>