Promotions and Vouchers

Promotions


PromotionResponse

Declared In:
lib/classes/models/Promotions/PromotionResponse.js

Related To:
Promotion

Inherits From:
BaseModel

Declaration:

class PromotionResponse extends BaseModel

Properties:

Property Type Optional Description
totalCount number no Total count of promotions
totalPages number no Total count of pages
page number no Current page
limit number no Limit of promotions per page
code number no HTTP code of the response
items Array no List of promotion items


Promotion

Declared In:
lib/classes/models/Promotions/Promotion.js

Related To:
PromotionResponse
PromotionStatus
PromotionType
PromotionDetails
PromotionItemScope
PromotionDiscountType
PromotionDiscountMode
PromotionDiscountModeDetails
PromotionImage

Inherits From:
BaseModel

Declaration:

class Promotion extends BaseModel

Properties:

Property Type Optional Description
uuid string no Promotion’s UUID
code string no Promotion’s code
status PromotionStatus yes Promotion’s status
type PromotionType yes Promotion’s type
details PromotionDetails yes Promotion’s details
redeemLimitPerClient number yes Redemption limit per customer
redeemQuantityPerActivation number yes Redemption quantity per activation
currentRedeemedQuantity number no Current redemption quantity
currentRedeemLimit number no Current redemption limit
activationCounter number no Promotion’s activation counter
possibleRedeems number no Maximum number of promotion redemptions
requireRedeemedPoints number yes Required redeemed points
discountType PromotionDiscountType yes Discount type
discountValue number no Discount value
discountMode PromotionDiscountMode no Discount mode
discountModeDetails PromotionDiscountModeDetails yes Discount mode details
priority number no Promotion’s priority
price number no Item price
itemScope PromotionItemScope no Promotion’s item scope
minBasketValue number yes Minimum basket value
maxBasketValue number yes Maximum basket value
name string no Promotion’s name
headline string yes Promotion’s headline
descriptionText string yes Promotion’s description
images [Array<PromotionImage> yes List of promotion images
startAt Date yes Start time of a promotion
expireAt Date yes Expiration time of the promotion
lastingAt Date yes Date when the promotion expires for the current profile
lastingTime number yes Duration of the promotion in seconds
displayFrom string yes Date as a string when the promotion starts being displayed
displayTo string yes Date as a string when the promotions ends being displayed
catalogIndexItems Array yes List of item indexes
params object yes Promotion’s custom parameters
tags Array yes Promotion’s custom tags


PromotionStatus

Declared In:
lib/classes/models/Promotions/PromotionStatus.js

Related To:
Promotion

Declaration:

enum PromotionStatus {
  None = 'NONE',
  Active = 'ACTIVE',
  Assigned = 'ASSIGNED',
  Redeemed = 'REDEEMED',
}

Functions:

Converts from PromotionStatus to string.

function PromotionStatusToString(promotionStatus: PromotionStatus): string


Converts from string to PromotionStatus.

function PromotionStatusFromString(string: string): PromotionStatus



PromotionType

Declared In:
lib/classes/models/Promotions/PromotionType.js

Related To:
Promotion

Declaration:

enum PromotionType {
  Unknown = 'UNKNOWN',
  MembersOnly = 'MEMBERS_ONLY',
  Custom = 'CUSTOM',
  General = 'GENERAL',
}

Functions:

Converts from PromotionType to string.

function PromotionTypeToString(promotionType: PromotionType): string


Converts from string to PromotionType.

function PromotionTypeFromString(string: string): PromotionType



PromotionItemScope

Declared In:
lib/classes/models/Promotions/PromotionItemScope.js

Related To:
Promotion

Declaration:

enum PromotionItemScope {
    LineItem = 'LINE_ITEM',
    Basket = 'BASKET'
}

Functions:
Converts from PromotionItemScope to string.

function PromotionItemScopeToString(promotionItemScope: PromotionItemScope): string


Converts from string to PromotionItemScope.

function PromotionItemScopeFromString(string: string): PromotionItemScope



PromotionDetails

Declared In:
lib/classes/models/Promotions/PromotionDetails.js

Related To:
PromotionDiscountTypeDetails

Inherits From:
BaseModel

Declaration:

class PromotionDetails extends BaseModel {
  discountType: PromotionDiscountTypeDetails;
}

Properties:

Property Type Optional Description
discountType PromotionDiscountTypeDetails yes Discount details


PromotionDiscountTypeDetails

Declared In:
lib/classes/models/Promotions/PromotionDiscountTypeDetails.js

Related To:
PromotionDetails

Inherits From:
BaseModel

Declaration:

class PromotionDiscountTypeDetails extends BaseModel {
  name: string;
  outerScope: boolean;
  requiredItemsCount: number;
  discountedItemsCount: number;
}

Properties:

Property Type Optional Description
name string no Discount’s name
outerScope boolean no When true, the items required to trigger the promotion are different than the items included in that promotion.
requiredItemsCount number no Number of items required to qualify for the discount
discountedItemsCount number no Number of discounted items


PromotionDiscountMode

Declared In:
lib/classes/models/Promotions/PromotionDiscountMode.js

Related To:
Promotion

Declaration:

enum PromotionDiscountMode {
    Static = 'STATIC',
    Step = 'STEP'
}

Functions:
Converts from PromotionDiscountMode to string.

function PromotionDiscountModeToString(promotionDiscountMode: PromotionDiscountMode): string


Converts from string to PromotionDiscountMode.

function PromotionDiscountModeFromString(string: string): PromotionDiscountMode



PromotionDiscountModeDetails

Declared In:
lib/classes/models/Promotions/PromotionDiscountModeDetails.js

Related To:
PromotionDiscountStep
PromotionDiscountUsageTrigger

Inherits From:
BaseModel

Declaration:

class PromotionDiscountModeDetails extends BaseModel {
  discountSteps: Array<PromotionDiscountStep>;
  discountUsageTrigger: PromotionDiscountUsageTrigger;
}

Properties:

Property Type Optional Description
discountSteps Array<PromotionDiscountStep> no List of discount steps
discountUsageTrigger PromotionDiscountUsageTrigger no Usage trigger for the discount


PromotionDiscountStep

Declared In:
lib/classes/models/Promotions/PromotionDiscountStep.js

Related To:
PromotionDiscountModeDetails

Inherits From:
BaseModel

Declaration:

class PromotionDiscountStep extends BaseModel {
  discountValue: number;
  usageThreshold: number;
}

Properties:

Property Type Optional Description
discountValue number no Value of the discount
usageThreshold number no Usage threshold


PromotionDiscountUsageTrigger

Declared In:
lib/classes/models/Promotions/PromotionDiscountUsageTrigger.js

Related To:
Promotion

Declaration:

enum PromotionDiscountUsageTrigger {
    Transaction = 'TRANSACTION',
    Redeem = 'REDEEM'
}

Functions:
Converts from PromotionDiscountUsageTrigger to string.

function PromotionDiscountUsageTriggerToString(promotionDiscountUsageTrigger: PromotionDiscountUsageTrigger): string


Converts from string to PromotionDiscountUsageTrigger.

function PromotionDiscountUsageTriggerFromString(string: string): PromotionDiscountUsageTrigger



PromotionImage

Declared In:
lib/classes/models/Promotions/PromotionImage.js

Related To:
Promotion
PromotionImageType

Inherits From:
BaseModel

Declaration:

class PromotionImage extends BaseModel {
  url: string;
  type: PromotionImageType;
}

Properties:

Property Type Optional Description
url string no URL of the image
type PromotionImageType no Image type


PromotionImageType

Declared In:
lib/classes/models/Promotions/PromotionImageType.js

Related To:
PromotionImage

Declaration:

enum PromotionImageType {
  Image = 'image',
  Thumbnail = 'thumbnail'
}

Functions:
Converts from PromotionImageType to string.

function PromotionImageTypeToString(promotionImageType: PromotionImageType): string


Converts from string to PromotionImageType.

function PromotionImageTypeFromString(string: string): PromotionImageType



PromotionDiscountType

Declared In:
lib/classes/models/Promotions/PromotionDiscountType.js

Related To:
Promotion

Declaration:

enum PromotionDiscountType {
  None = 'NONE',
  Percent = 'PERCENT',
  Amount = 'AMOUNT',
  TwoForOne = '2_FOR_1',
  Points = 'POINTS',
  Multibuy = 'MULTIBUY',
}

Functions:

Converts from PromotionDiscountType to string.

function PromotionDiscountTypeToString(promotionDiscountType: PromotionDiscountType): string


Converts from string to PromotionDiscountType.

function PromotionDiscountTypeFromString(string: string): PromotionDiscountType



PromotionIdentifier

Declared In:
lib/classes/models/Promotions/PromotionIdentifier.js

Declaration:

class PromotionIdentifier {
  key: string;
  value: string;
}

Properties:

Property Type Optional Default Description
key string yes Promotion identifier type (see PromotionIdentifierKey enum)
value string yes Promotion identifier value

Initializers:

constructor(key: PromotionIdentifierKey, value: string)



PromotionIdentifierKey

Declared In:
lib/classes/models/Promotions/PromotionIdentifierKey.js

Declaration:

enum PromotionIdentifierKey {
  Uuid = 'UUID',
  Code = 'CODE',
}



PromotionsApiQuery

Object for setting parameters to facilitate fetching promotions from the API.

Declared In:
lib/classes/models/api_queries/PromotionsApiQuery.js

Related To:
PromotionResponse
Promotion

Inherits From:
BaseApiQuery

Declaration:

class PromotionsApiQuery extends BaseApiQuery

Properties:

Property Type Optional Default Description
statuses Array no [] List of promotion statuses for query
types Array no [] List of promotion types for query
Note:

Initializers:

constructor()



Vouchers


AssignVoucherResponse

Declared In:
lib/classes/models/Vouchers/AssignVoucherResponse.js

Related To:
AssignVoucherData

Inherits From:
BaseModel

Declaration:

class AssignVoucherResponse extends BaseModel

Properties:

Property Type Optional Description
message string no Message from the Voucher assignment response
assignVoucherData AssignVoucherData yes List of vouchers in a pool


VoucherCodesResponse

Declared In:
lib/classes/models/Vouchers/VoucherCodesResponse.js

Related To:
VoucherCodesData

Inherits From:
BaseModel

Declaration:

class VoucherCodesResponse extends BaseModel

Properties:

Property Type Optional Description
items Array<VoucherCodesData> no List of voucher items


AssignVoucherData

Declared In:
lib/classes/models/Vouchers/AssignVoucherData.js

Related To:
AssignVoucherResponse

Inherits From:
BaseModel

Declaration:

class AssignVoucherData extends BaseModel

Properties:

Property Type Optional Description
code string no Voucher’s code
expireIn Date yes Voucher’s expiration date
redeemAt Date yes Voucher’s redemption date
assignedAt Date yes Voucher’s assignment date
createdAt Date no Voucher’s creation date
updatedAt Date no Voucher’s update date


VoucherCodesData

Declared In:
lib/classes/models/Vouchers/VoucherCodesData.js

Inherits From:
BaseModel

Declaration:

class VoucherCodesData extends BaseModel

Properties:

Property Type Optional Description
code string no Voucher’s code
status VoucherCodeStatus no Voucher’s status
clientId string no ID of the customer to whom the voucher is assigned
clientUuid string no UUID of the customer to whom the voucher is assigned
poolUuid string no Voucher’s pool ID
expireIn string no Voucher’s expiration date
redeemAt Date no Voucher’s redemption date
assignedAt Date no Voucher’s assignment date
createdAt Date no Voucher’s creation date
updatedAt Date no Voucher’s update date


VoucherCodeStatus

Declared In:
lib/classes/models/Vouchers/VoucherCodeStatus.js

Declaration:

enum VoucherCodeStatus {
  Unassigned = 'UNASSIGNED',
  Assigned = 'ASSIGNED',
  Redeemed = 'REDEEMED',
  Canceled = 'CANCELED',
}

Functions:

Converts from VoucherCodeStatus to string.

function VoucherCodeStatusToString(voucherCodeStatus: VoucherCodeStatus): string


Converts from string to VoucherCodeStatus.

function VoucherCodeStatusFromString(string: string): VoucherCodeStatus

đŸ˜•

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

đŸ˜‰

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker