Skip to main content

PromotionsService

A list of all methods in the PromotionsService service. Click on the method name to view detailed information about that method.

MethodsDescription
MultichannelPromotions_GetByIdGets the multichannel promotion with the identifier which is set by Voyado
MultichannelPromotions_UpdateUpdates an existing multichannel promotion. Only multichannel promotion in status 'Draft' can be updated.
MultichannelPromotions_DeleteByIdOnly unassigned multichannel promotions can be deleted
MultichannelPromotions_GetValidityByIdGets the multichannel promotion with the identifier which is an internal reference for Voyado
MultichannelPromotions_UpdateValidityUpdates duration of an existing multichannel promotion. Only multichannel promotion in status 'Draft' can be updated.
MultichannelPromotions_GetByExternalIdGets the multichannel promotion with the identifier which is an external reference for Voyado
MultichannelPromotions_CreateOnly creates multichannel promotion in status 'Draft'.
MultichannelPromotions_DeleteByExternalIdOnly unassigned multichannel promotions can be deleted
MultichannelPromotions_GetByValidityExternalIdGets the multichannel promotion validity with the identifier which is an external reference for Voyado
OfferPromotions_RedeemByPromotionIdRedeem a promotion (multichannel offer or mobile swipe) for a Contact using the internal promotion Id Redemption channel can be POS, ECOM or OTHER.
OfferPromotions_ReactivatePromotionCodeReactivate a redeemed reward voucher

MultichannelPromotions_GetById

Gets the multichannel promotion with the identifier which is set by Voyado

  • HTTP Method: GET
  • Endpoint: /api/v2/promotions/multichannels/{id}

Parameters

NameTypeRequiredDescription
idstringPromotion identifier from Voyado

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const { data } = await voyadoEngage.promotions.multichannelPromotionsGetById('id');

console.log(data);
})();

MultichannelPromotions_Update

Updates an existing multichannel promotion. Only multichannel promotion in status 'Draft' can be updated.

  • HTTP Method: PUT
  • Endpoint: /api/v2/promotions/multichannels/{id}

Parameters

NameTypeRequiredDescription
bodyMultichannelPromotionModelThe request body.
idstringVoyado multichannel promotion identifier

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

import {
MultichannelPromotionModel,
MultichannelPromotionRedemptionChannelModel,
PromotionBasicPresentationModel,
PromotionValidityModel,
VoyadoEngage,
} from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const multichannelPromotionModelStatus = MultichannelPromotionModelStatus.Ended;

const unit = Unit.Months;

const assignDateRange: AssignDateRange = {
unit: unit,
amount: 1231786213,
};

const promotionValidityModel: PromotionValidityModel = {
startDate: 'startDate',
endDate: 'endDate',
assignedValidity: assignDateRange,
};

const promotionBasicPresentationModel: PromotionBasicPresentationModel = {
heading: 'heading',
description: 'description',
link: 'link',
};

const multichannelPromotionRedemptionChannelModelType = MultichannelPromotionRedemptionChannelModelType.POS;

const multichannelPromotionRedemptionChannelModelValueType =
MultichannelPromotionRedemptionChannelModelValueType.PERCENT;

const multichannelPromotionRedemptionChannelModel: MultichannelPromotionRedemptionChannelModel = {
type: multichannelPromotionRedemptionChannelModelType,
valueType: multichannelPromotionRedemptionChannelModelValueType,
value: 'value',
localValues: [{}],
instruction: 'instruction',
};

const input: MultichannelPromotionModel = {
id: '00000000-0000-0000-0000-000000000000',
status: multichannelPromotionModelStatus,
externalId: 'externalId',
name: 'name',
validity: promotionValidityModel,
presentation: promotionBasicPresentationModel,
redemptionChannels: [multichannelPromotionRedemptionChannelModel],
};

const { data } = await voyadoEngage.promotions.multichannelPromotionsUpdate('id', input);

console.log(data);
})();

MultichannelPromotions_DeleteById

Only unassigned multichannel promotions can be deleted

  • HTTP Method: DELETE
  • Endpoint: /api/v2/promotions/multichannels/{id}

Parameters

NameTypeRequiredDescription
idstringVoyado identifier to a multichannel promotion

Return Type

StatusCodeResult

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const { data } = await voyadoEngage.promotions.multichannelPromotionsDeleteById('id');

console.log(data);
})();

MultichannelPromotions_GetValidityById

Gets the multichannel promotion with the identifier which is an internal reference for Voyado

  • HTTP Method: GET
  • Endpoint: /api/v2/promotions/multichannels/{id}/validity

Parameters

NameTypeRequiredDescription
idstringIdentifier inside of Voyado

Return Type

PromotionValidityModel

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const { data } = await voyadoEngage.promotions.multichannelPromotionsGetValidityById('id');

console.log(data);
})();

MultichannelPromotions_UpdateValidity

Updates duration of an existing multichannel promotion. Only multichannel promotion in status 'Draft' can be updated.

  • HTTP Method: PUT
  • Endpoint: /api/v2/promotions/multichannels/{id}/validity

Parameters

NameTypeRequiredDescription
bodyPromotionValidityModelThe request body.
idstringVoyado multichannel promotion identifier

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

import { AssignDateRange, PromotionValidityModel, VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const unit = Unit.Months;

const assignDateRange: AssignDateRange = {
unit: unit,
amount: 1231786213,
};

const input: PromotionValidityModel = {
startDate: 'startDate',
endDate: 'endDate',
assignedValidity: assignDateRange,
};

const { data } = await voyadoEngage.promotions.multichannelPromotionsUpdateValidity('id', input);

console.log(data);
})();

MultichannelPromotions_GetByExternalId

Gets the multichannel promotion with the identifier which is an external reference for Voyado

  • HTTP Method: GET
  • Endpoint: /api/v2/promotions/multichannels

Parameters

NameTypeRequiredDescription
externalIdstringExternal identifier outside of Voyado

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const { data } = await voyadoEngage.promotions.multichannelPromotionsGetByExternalId({
externalId: 'externalId',
});

console.log(data);
})();

MultichannelPromotions_Create

Only creates multichannel promotion in status 'Draft'.

  • HTTP Method: POST
  • Endpoint: /api/v2/promotions/multichannels

Parameters

NameTypeRequiredDescription
bodyMultichannelBasePromotionModelThe request body.

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

import {
MultichannelBasePromotionModel,
MultichannelPromotionRedemptionChannelModel,
PromotionBasicPresentationModel,
PromotionValidityModel,
VoyadoEngage,
} from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const unit = Unit.Months;

const assignDateRange: AssignDateRange = {
unit: unit,
amount: 1231786213,
};

const promotionValidityModel: PromotionValidityModel = {
startDate: 'startDate',
endDate: 'endDate',
assignedValidity: assignDateRange,
};

const promotionBasicPresentationModel: PromotionBasicPresentationModel = {
heading: 'heading',
description: 'description',
link: 'link',
};

const multichannelPromotionRedemptionChannelModelType = MultichannelPromotionRedemptionChannelModelType.POS;

const multichannelPromotionRedemptionChannelModelValueType =
MultichannelPromotionRedemptionChannelModelValueType.PERCENT;

const multichannelPromotionRedemptionChannelModel: MultichannelPromotionRedemptionChannelModel = {
type: multichannelPromotionRedemptionChannelModelType,
valueType: multichannelPromotionRedemptionChannelModelValueType,
value: 'value',
localValues: [{}],
instruction: 'instruction',
};

const input: MultichannelBasePromotionModel = {
externalId: 'externalId',
name: 'name',
validity: promotionValidityModel,
presentation: promotionBasicPresentationModel,
redemptionChannels: [multichannelPromotionRedemptionChannelModel],
};

const { data } = await voyadoEngage.promotions.multichannelPromotionsCreate(input);

console.log(data);
})();

MultichannelPromotions_DeleteByExternalId

Only unassigned multichannel promotions can be deleted

  • HTTP Method: DELETE
  • Endpoint: /api/v2/promotions/multichannels

Parameters

NameTypeRequiredDescription
externalIdstringExternal identifier to a multichannel promotion

Return Type

StatusCodeResult

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const { data } = await voyadoEngage.promotions.multichannelPromotionsDeleteByExternalId({
externalId: 'externalId',
});

console.log(data);
})();

MultichannelPromotions_GetByValidityExternalId

Gets the multichannel promotion validity with the identifier which is an external reference for Voyado

  • HTTP Method: GET
  • Endpoint: /api/v2/promotions/multichannels/validity

Parameters

NameTypeRequiredDescription
externalIdstringExternal identifier outside of Voyado

Return Type

PromotionValidityModel

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const { data } = await voyadoEngage.promotions.multichannelPromotionsGetByValidityExternalId({
externalId: 'externalId',
});

console.log(data);
})();

OfferPromotions_RedeemByPromotionId

Redeem a promotion (multichannel offer or mobile swipe) for a Contact using the internal promotion Id Redemption channel can be POS, ECOM or OTHER.

  • HTTP Method: POST
  • Endpoint: /api/v2/promotions/codes/{promotionId}/redeem

Parameters

NameTypeRequiredDescription
bodyRedeemBodyModelThe request body.
promotionIdstringThe id of the promotion

Return Type

any

Example Usage Code Snippet

import { RedeemBodyModel, VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const input: RedeemBodyModel = {
redemptionChannel: 'redemptionChannel',
};

const { data } = await voyadoEngage.promotions.offerPromotionsRedeemByPromotionId('promotionId', input);

console.log(data);
})();

OfferPromotions_ReactivatePromotionCode

Reactivate a redeemed reward voucher

  • HTTP Method: POST
  • Endpoint: /api/v2/promotions/reward-vouchers/{id}/reactivate

Parameters

NameTypeRequiredDescription
idstringThe id of the reward voucher

Return Type

string

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const { data } = await voyadoEngage.promotions.offerPromotionsReactivatePromotionCode('id');

console.log(data);
})();

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →