Responses

BaseModel

Base class for all models.

WARNING: This is an abstract class and it is not meant to be instantiated directly.

Declared In

lib/classes/models/BaseModel.js

Declaration

interface ModelMappable {
  toObject(): object;
}
abstract class BaseModel implements ModelMappable


ClientAccountInformation

Model representating the customer information.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In

lib/classes/models/Client/ClientAccountInformation.js

ClientSex
ClientAgreements

Inherits From

BaseModel

Declaration

class ClientAccountInformation extends BaseModel

Properties

Property Type Optional Description
clientId number no Customer’s client ID
email string no Customer’s email
phone string yes Customer’s phone
customId string yes Customer’s custom ID
uuid string no Customer’s UUID
firstName string yes Customer’s first name
lastName string yes Customer’s last name
displayName string yes Customer’s display name
sex ClientSex no Customer’s sex
company string yes Customer’s company
address string yes Customer’s address
city string yes Customer’s city
province string yes Customer’s province
zipCode string yes Customer’s ZIP code
countryCode string yes Customer’s country code
birthDate string yes Customer’s birthdate
lastActivityDate Date no Customer’s last activity date
avatarUrl string yes Customer’s avatar URL
anonymous boolean no Customer’s anonymous flag
agreements ClientAgreements no Customer’s agreements
attributes Array<object> yes Customer’s attributes
tags Array<string> yes Customer’s tags


ClientSex

Declared In

lib/classes/models/Client/ClientSex.js

Declaration

enum ClientSex {
  NotSpecified = 'NOT_SPECIFIED',
  Male = 'MALE',
  Female = 'FEMALE',
  Other = 'OTHER',
}

Functions

Converts from ClientSex to string.

function ClientSexToString(clientSex: ClientSex): string


Converts from string to ClientSex.

function ClientSexFromString(string: string): ClientSex



ClientAgreements

Declared In

lib/classes/models/Client/ClientAgreements.js

Inherits From

BaseModel

Declaration

interface IClientAgreements {
  email?: boolean;
  sms?: boolean;
  push?: boolean;
  bluetooth?: boolean;
  rfid?: boolean;
  wifi?: boolean;
}
class ClientAgreements extends BaseModel

Properties

Property Type Optional Description
email boolean no Email agreement
sms boolean no SMS agreement
push boolean no Push Notifications agreement
bluetooth boolean no Bluetooth agreement
rfid boolean no RFID agreement
wifi boolean no WIFI agreement

Initializers

constructor()
constructor(modelObject?: IClientAgreements)


Token

Declared In

lib/classes/models/Token/Token.js

TokenOrigin

Inherits From

BaseModel

Declaration

class Token extends BaseModel

Properties

Property Type Optional Description
tokenString string no Token as a raw string
tokenOrigin TokenOrigin no Token’s origin
expirationDate string yes Token’s expiration time


TokenOrigin

Declared In

lib/classes/models/Token/TokenOrigin.js

Declaration

enum TokenOrigin {
  Unknown = 'UNKNOWN',
  Synerise = 'SYNERISE',
  Facebook = 'FACEBOOK',
  Oauth = 'OAUTH',
}

Functions

Converts from TokenOrigin to string.

function TokenOriginToString(tokenOrigin: TokenOrigin): string


Converts from string to TokenOrigin.

function TokenOriginFromString(string: string): TokenOrigin



PromotionResponse

Declared In

lib/classes/models/Promotions/PromotionResponse.js

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<Promotion> no List of promotion items


Promotion

Declared In

lib/classes/models/Promotions/Promotion.js

PromotionResponse
PromotionStatus
PromotionType PromotionDiscountType

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
redeemLimitPerClient number yes Redemption limit per client
redeemQuantityPerActivation number yes Redemption quantity per activation
currentRedeemedQuantity number no Current redemption quantity
currentRedeemLimit number yes Current redemption limit
activationCounter number no Promotion’s activation counter
discountType PromotionDiscountType yes Discount value
discountValue number no Discount type
requireRedeemedPoints number yes Required redeemed points
priority number yes Promotion’s priority
price number no Item price
name string yes Promotion’s name
headline string yes Promotion’s headline
descriptionText string yes Promotion’s description
images Array<object> yes List of promotion images
startAt Date yes Start time of a promotion
expireAt Date yes Expiration time of the promotion
lastingAt Date yes How long the promotion lasts
params object yes Promotion’s custom parameters
catalogIndexItems Array<string> yes List of item indexes


PromotionStatus

Declared In

lib/classes/models/Promotions/PromotionStatus.js

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

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



PromotionDiscountType

Declared In

lib/classes/models/Promotions/PromotionDiscountType.js

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



AssignVoucherResponse

Declared In

lib/classes/models/Vouchers/AssignVoucherResponse.js

AssignVoucherData

Inherits From

BaseModel

Declaration

class AssignVoucherResponse extends BaseModel

Properties

Property Type Optional Description
message string no Message from Voucher assignment response
assignVoucherData AssignVoucherData yes List of voucher data items


AssignVoucherData

Declared In

lib/classes/models/Vouchers/AssignVoucherData.js

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 redeem date
assignedAt Date yes Voucher’s assignment date
createdAt Date no Voucher’s creation date
updatedAt Date no Voucher’s update date


VoucherCodesResponse

Declared In

lib/classes/models/Vouchers/VoucherCodesResponse.js

VoucherCodesData

Inherits From

BaseModel

Declaration

class VoucherCodesResponse extends BaseModel

Properties

Property Type Optional Description
items [VoucherCodesData] no List of voucher items


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 Voucher’s client ID
clientUuid string no Voucher’s client UUID
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



RecommendationResponse

Declared In

lib/classes/content/RecommendationResponse.js

Recommendation

Inherits From

BaseModel

Declaration

class RecommendationResponse extends BaseModel

Properties

Property Type Optional Description
name string no Recommendations name
campaignHash string no Campaign Hash
campaignID string no Campaign ID
items Array<recommendation> no List of recommendation items


Recommendation

Model representating a recommendation item data.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In

lib/classes/Content/Recommendation.js

RecommendationResponse

Inherits From

BaseModel

Declaration

class Recommendation extends BaseModel

Properties

Property Type Optional Description
itemID string no Product’s GTIN
attributes Record<string, any> no Product’s recommendation attributes


ScreenViewResponse

Model representing a highest-priority customer screen view campaign.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In

lib/classes/content/ScreenViewResponse.js

ScreenViewAudience

Inherits From

BaseModel

Declaration

class ScreenViewResponse extends BaseModel

Properties

Property Type Optional Description
audience ScreenViewAudience no Audience of a screen view
identifier string no Screen View’s ID
hashString string no Screen View’s hash
path string no Screen View’s path
name string no Screen View’s name
priority number no Screen View’s priority
descriptionText string yes Screen View’s description
data object no Screen View’s data
version string no Version of a screen view
parentVersion string yes Parent version of a screen view
createdAt Date no Screen View’s creation date
updatedAt Date no Screen View’s update date
deletedAt Date yes Screen View’s deletion date


ScreenViewAudience

Model representing an audience of customer screen view.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In

lib/classes/content/ScreenViewAudience.js

ScreenViewResponse

Inherits From

BaseModel

Declaration

class ScreenViewAudience extends BaseModel

Properties

Property Type Optional Description
IDs Array<string> yes Audience’s identifiers
query string yes Audience’s query
😕

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.