GET v1/Promotions/Flat?portal={portal}&asOfDate={asOfDate}&startDate={startDate}&numberOfDays={numberOfDays}

Gets a list of promotions for a portal, supports the csv format

Request Information

URI Parameters

NameDescriptionTypeAdditional information
portal

The portal context for which you will be retrieving users

string

Required

asOfDate

If the asOfDate is present than the results will show all currently approved and running promotions as of the Date specified.

date

None.

startDate

If asOfDate is not specified the startDate will be used to return promotions based upon when they were submitted taking into account the numberOfDays field. Defaults to 30 days ago.

date

None.

numberOfDays

Used in correlation with the asOfDate to determine how many days of promotions to include. Defaults to 30.

integer

None.

Body Parameters

None.

Response Information

Resource Description

A collection of promotions

Collection of UserPromotionFlat
NameDescriptionTypeAdditional information
eventName

Name of event associated to promotion

string

None.

amount

Promotion Amount

decimal number

None.

type

Promotion type

string

None.

orderDate

Date the promotion was entered

date

None.

eventId

event associated to the promotion. Will be null if there is no event associated

integer

None.

promoImage

Url of the image associated with the promotion if one exists.

string

None.

destinationUrl

Url of the website associated to the promotion if one exists.

string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "eventName": "sample string 1",
    "amount": 2.0,
    "type": "sample string 3",
    "orderDate": "2024-07-01T20:24:19.4919117+00:00",
    "eventId": 1,
    "promoImage": "sample string 5",
    "destinationUrl": "sample string 6"
  },
  {
    "eventName": "sample string 1",
    "amount": 2.0,
    "type": "sample string 3",
    "orderDate": "2024-07-01T20:24:19.4919117+00:00",
    "eventId": 1,
    "promoImage": "sample string 5",
    "destinationUrl": "sample string 6"
  }
]

text/xml

Sample:
<ArrayOfUserPromotionFlat xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CitySpark.API.Models">
  <UserPromotionFlat>
    <amount>2</amount>
    <destinationUrl>sample string 6</destinationUrl>
    <eventId>1</eventId>
    <eventName>sample string 1</eventName>
    <orderDate>2024-07-01T20:24:19.4919117+00:00</orderDate>
    <promoImage>sample string 5</promoImage>
    <type>sample string 3</type>
  </UserPromotionFlat>
  <UserPromotionFlat>
    <amount>2</amount>
    <destinationUrl>sample string 6</destinationUrl>
    <eventId>1</eventId>
    <eventName>sample string 1</eventName>
    <orderDate>2024-07-01T20:24:19.4919117+00:00</orderDate>
    <promoImage>sample string 5</promoImage>
    <type>sample string 3</type>
  </UserPromotionFlat>
</ArrayOfUserPromotionFlat>

text/csv

Sample:
eventName,amount,type,orderDate,eventId,promoImage,destinationUrl
sample string 1,2,sample string 3,7/1/2024 8:24:19 PM,1,sample string 5,sample string 6
sample string 1,2,sample string 3,7/1/2024 8:24:19 PM,1,sample string 5,sample string 6