GET rest/coupons/{couponId}

Gets a coupon.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
couponId

Coupon id.

globally unique identifier

Required

Body Parameters

None.

Response Information

Resource Description

Coupon
NameDescriptionTypeAdditional information
id

Id of coupon, must be unique.

globally unique identifier

None.

Version

Coupon version. Default is 0. Use version 2 for the new html template engine.

byte

None.

PartnerId

Id of Link partner from Partner API.

integer

None.

Type

COUPON or COUPON_BOOK

string

None.

Username

Username from login.

string

None.

Name

Name of coupon.

string

None.

Description

Description of coupon.

string

None.

start

When the coupon should start being active.

date

None.

stop

When the coupon should stop being active.

date

None.

ReceiveOnce

If coupon codes should be limited to one pr user.

boolean

None.

Usages

[Version 2 Only] Gets or sets the usages for a coupon. Valid values in the array are: * 1\. Bulk sending. * 2\. Opt-in message.

Collection of CouponUsage

None.

HeaderText

[Version 2 Only] Coupon header text.

string

None.

HeaderBackgroundColor

[Version 2 Only] Coupon header background color.

string

None.

ThumbnailButtonText

[Version 2 Only] Coupon thumbnail button text.

string

None.

MainText

[Version 2 Only] Main text.

string

None.

ImageText

[Version 2 Only] Coupon image overlay text.

string

None.

ConditionsText

[Version 2 Only] Coupon conditions text.

string

None.

RedeemButtonText

[Version 2 Only] Coupon redeem button text.

string

None.

RedeemButtonTextColor

[Version 2 Only] Coupon redeem button text color.

string

None.

RedeemButtonBackgroundColor

[Version 2 Only] Coupon redeem button background color.

string

None.

RedeemWarningMessage

[Version 2 Only] Coupon redeem-popup warning message.

string

None.

RedeemOkButtonText

[Version 2 Only] Coupon redeem-popup ok button text.

string

None.

RedeemCancelButtonText

[Version 2 Only] Coupon redeem-popup cancel button text.

string

None.

RedeemOverlayText

[Version 2 Only] Overlay text shown when coupon is redeemed.

string

None.

BackgroundColor

[Version 2 Only] Coupon background color.

string

None.

ImageTextColor

[Version 2 Only] Coupon image text color

string

None.

ValidText

[Version 2 Only] Valid text

string

None.

ActiveSoonStatusText

[Version 2 Only] Active soon status text

string

None.

ActiveStatusText

[Version 2 Only] Active status text

string

None.

ActivationTimeText

[Version 2 Only] Activation time text

string

None.

ExpiredStatusText

[Version 2 Only] Expired status text

string

None.

ExpirationTimeText

[Version 2 Only] Expiration time text

string

None.

IsInCouponBook

WARNING! This property is obsolete. Please use ThumbnailButtonText instead. This field will be removed in a future version of the API. [Version 2 Only] Whether coupon is in a coupon book (read-only property).

boolean

None.

CouponBookId

[Version 2 Only] Gets or sets the Ids of the connected coupon books.

globally unique identifier

None.

UsageCount

How many times user has used coupon.

integer

None.

validityPeriodMinutes

How many minutes the coupon is valid.

integer

None.

SiteTemplateId

Site template id for coupon.

globally unique identifier

None.

CodeGeneratorConfiguration

Type of codes generated.

CodeGeneratorConfiguration

None.

Site

Coupon web site.

Site

None.

StoreName

[Version 2 Only] Gets or sets the store name that is sending this coupon.

string

None.

DiscountType

[Version 2 Only] Gets or sets the type of discount that the property represents. Valid values are: * 1\. The discount is given in percentages of the sales price. * 2\. The discount is given price discount subtracted from the sales price. * 3\. Some other type of discount (free, 3 for 2 and so on).

DiscountType

None.

DiscountValue

[Version 2 Only] Gets or sets the value of the discount, as described by .

decimal number

None.

DynamicFields

A list of dynamic fields. The key is used in the HTML template and replaced with the corresponding value when the actual coupon is served.

Dictionary of string [key] and string [value]

None.

Images

[Version 2] Coupon images.

Collection of CouponImage

None.

created

When the coupon was created.

date

None.

lastModified

When the coupon was last modified.

date

None.

BatchIds

Collection of batch ids (equivalent of SendingId in Sender).

Collection of string

None.

MaxRedeemedCount

Max redeemed count

byte

None.

Response Formats

application/json, text/json

Sample:
{
  "id": "907855ad-5e63-40ec-a160-7c791d58bad5",
  "version": 64,
  "partnerId": 4,
  "type": "sample string 5",
  "username": "sample string 6",
  "name": "sample string 7",
  "description": "sample string 8",
  "start": 1545176503854,
  "stop": 1545176503854,
  "receiveOnce": true,
  "usages": [
    1,
    1
  ],
  "headerText": "sample string 10",
  "headerBackgroundColor": "sample string 11",
  "thumbnailButtonText": "sample string 12",
  "mainText": "sample string 13",
  "imageText": "sample string 14",
  "conditionsText": "sample string 15",
  "redeemButtonText": "sample string 16",
  "redeemButtonTextColor": "sample string 17",
  "redeemButtonBackgroundColor": "sample string 18",
  "redeemWarningMessage": "sample string 19",
  "redeemOkButtonText": "sample string 20",
  "redeemCancelButtonText": "sample string 21",
  "redeemOverlayText": "sample string 22",
  "backgroundColor": "sample string 23",
  "imageTextColor": "sample string 24",
  "validText": "sample string 25",
  "activeSoonStatusText": "sample string 26",
  "activeStatusText": "sample string 27",
  "activationTimeText": "sample string 28",
  "expiredStatusText": "sample string 29",
  "expirationTimeText": "sample string 30",
  "isInCouponBook": true,
  "couponBookId": "455627fe-9c9a-49e1-8027-e435de23ecaf",
  "usageCount": 32,
  "validityPeriodMinutes": 1,
  "siteTemplateId": "c4ea8eb9-b158-4ca6-a543-33270b6f6033",
  "codeGeneratorConfiguration": {
    "type": "sample string 1",
    "length": "sample string 2"
  },
  "site": {
    "pages": [
      {
        "type": "sample string 2",
        "name": "sample string 3",
        "content": "sample string 4",
        "partial": true
      },
      {
        "type": "sample string 2",
        "name": "sample string 3",
        "content": "sample string 4",
        "partial": true
      }
    ],
    "properties": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    }
  },
  "storeName": "sample string 33",
  "discountType": 1,
  "discountValue": 1.0,
  "dynamicFields": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "images": [
    {
      "name": "sample string 3",
      "resizeWidth": 1,
      "resizeHeight": 1,
      "cropLeft": 1,
      "cropTop": 1,
      "cropWidth": 1,
      "cropHeight": 1,
      "lastModifiedUtc": "2018-12-18T23:41:43.8548915Z",
      "createdUtc": "2018-12-18T23:41:43.8548915Z",
      "data": "sample string 6"
    },
    {
      "name": "sample string 3",
      "resizeWidth": 1,
      "resizeHeight": 1,
      "cropLeft": 1,
      "cropTop": 1,
      "cropWidth": 1,
      "cropHeight": 1,
      "lastModifiedUtc": "2018-12-18T23:41:43.8548915Z",
      "createdUtc": "2018-12-18T23:41:43.8548915Z",
      "data": "sample string 6"
    }
  ],
  "created": 1545176503854,
  "lastModified": 1545176503854,
  "batchIds": [
    "sample string 1",
    "sample string 2"
  ],
  "maxRedeemedCount": 64
}

application/xml, text/xml

Sample:
<Coupon xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.linkmobility.com/common/coupons">
  <ActivationTimeText>sample string 28</ActivationTimeText>
  <ActiveSoonStatusText>sample string 26</ActiveSoonStatusText>
  <ActiveStatusText>sample string 27</ActiveStatusText>
  <BackgroundColor>sample string 23</BackgroundColor>
  <BatchIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </BatchIds>
  <CodeGeneratorConfiguration>
    <Length>sample string 2</Length>
    <Type>sample string 1</Type>
  </CodeGeneratorConfiguration>
  <ConditionsText>sample string 15</ConditionsText>
  <CouponBookId>455627fe-9c9a-49e1-8027-e435de23ecaf</CouponBookId>
  <Description>sample string 8</Description>
  <DiscountType>Percentage</DiscountType>
  <DiscountValue>1</DiscountValue>
  <DynamicFields xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </DynamicFields>
  <ExpirationTimeText>sample string 30</ExpirationTimeText>
  <ExpiredStatusText>sample string 29</ExpiredStatusText>
  <HeaderBackgroundColor>sample string 11</HeaderBackgroundColor>
  <HeaderText>sample string 10</HeaderText>
  <ImageText>sample string 14</ImageText>
  <ImageTextColor>sample string 24</ImageTextColor>
  <Images>
    <CouponImage>
      <Data>sample string 6</Data>
      <CreatedUtc>2018-12-18T23:41:43.8548915+00:00</CreatedUtc>
      <CropHeight>1</CropHeight>
      <CropLeft>1</CropLeft>
      <CropTop>1</CropTop>
      <CropWidth>1</CropWidth>
      <LastModifiedUtc>2018-12-18T23:41:43.8548915+00:00</LastModifiedUtc>
      <Name>sample string 3</Name>
      <ResizeHeight>1</ResizeHeight>
      <ResizeWidth>1</ResizeWidth>
    </CouponImage>
    <CouponImage>
      <Data>sample string 6</Data>
      <CreatedUtc>2018-12-18T23:41:43.8548915+00:00</CreatedUtc>
      <CropHeight>1</CropHeight>
      <CropLeft>1</CropLeft>
      <CropTop>1</CropTop>
      <CropWidth>1</CropWidth>
      <LastModifiedUtc>2018-12-18T23:41:43.8548915+00:00</LastModifiedUtc>
      <Name>sample string 3</Name>
      <ResizeHeight>1</ResizeHeight>
      <ResizeWidth>1</ResizeWidth>
    </CouponImage>
  </Images>
  <IsInCouponBook>true</IsInCouponBook>
  <MainText>sample string 13</MainText>
  <MaxRedeemedCount>64</MaxRedeemedCount>
  <Name>sample string 7</Name>
  <PartnerId>4</PartnerId>
  <ReceiveOnce>true</ReceiveOnce>
  <RedeemButtonBackgroundColor>sample string 18</RedeemButtonBackgroundColor>
  <RedeemButtonText>sample string 16</RedeemButtonText>
  <RedeemButtonTextColor>sample string 17</RedeemButtonTextColor>
  <RedeemCancelButtonText>sample string 21</RedeemCancelButtonText>
  <RedeemOkButtonText>sample string 20</RedeemOkButtonText>
  <RedeemOverlayText>sample string 22</RedeemOverlayText>
  <RedeemWarningMessage>sample string 19</RedeemWarningMessage>
  <Site>
    <Pages>
      <SitePage>
        <Content>sample string 4</Content>
        <Name>sample string 3</Name>
        <Partial>true</Partial>
        <Type>sample string 2</Type>
      </SitePage>
      <SitePage>
        <Content>sample string 4</Content>
        <Name>sample string 3</Name>
        <Partial>true</Partial>
        <Type>sample string 2</Type>
      </SitePage>
    </Pages>
    <Properties xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Properties>
  </Site>
  <SiteTemplateId>c4ea8eb9-b158-4ca6-a543-33270b6f6033</SiteTemplateId>
  <StoreName>sample string 33</StoreName>
  <ThumbnailButtonText>sample string 12</ThumbnailButtonText>
  <Type>sample string 5</Type>
  <UsageCount>32</UsageCount>
  <Usages xmlns:d2p1="http://schemas.datacontract.org/2004/07/Common.Coupons.Model.Enums">
    <d2p1:CouponUsage>BulkSending</d2p1:CouponUsage>
    <d2p1:CouponUsage>BulkSending</d2p1:CouponUsage>
  </Usages>
  <Username>sample string 6</Username>
  <ValidText>sample string 25</ValidText>
  <Version>64</Version>
  <created>2018-12-18T23:41:43.8548915+00:00</created>
  <id>907855ad-5e63-40ec-a160-7c791d58bad5</id>
  <lastModified>2018-12-18T23:41:43.8548915+00:00</lastModified>
  <start>2018-12-18T23:41:43.8548915+00:00</start>
  <stop>2018-12-18T23:41:43.8548915+00:00</stop>
  <validityPeriodMinutes>1</validityPeriodMinutes>
</Coupon>