Skip to main content

ContactsService

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

MethodsDescription
ContactsV_CountGet number of approved contacts. This is a cached value that will be updated with a set frequency (normally once every 20 min).
ContactsV_GetContactByIdGet a single contact, using the unique identifier. The dynamic fields of the response object depend on the current instance configuration.
ContactsV_UpdateContactPostUpdate one or several fields of a single contact. Dont send an empty value unless you want it to be empty.
ContactsV_DeleteWithHeaderParam
ContactsV_CountByContactTypeGet number of approved contacts of given type. This is a cached value that will be updated with a set frequency (normally once every 20 min).
ContactBulk_GetBulkStatus
ContactsV_GetContactByTypeAndKeyValueInUrlAsync! Please be aware that this endpoint is currently usable with either the key value being provided through ! ! the path or a query param. Hence there being two of the same endpoints. ! ! We recommend that you use the query param version (the first) as it is the more versatile one of the two ! Get a single contact of a certain type, using a key value that corresponds to the current instance configuration. This can only be used for contact types with exactly ONE key. The dynamic fields of the response object depend on the current configuration.
ProductRecommendation_GetProductRecommendations
ContactRetailKpi_GetPurchaseHistoryFollowing summary shows the purchase history for a single contact, over all time, 12 months and 24 months.
BackInStockSubscription_GetByContactIdGet back in stock subscriptions for a contact
ContactsV_GetContactByExternalIdAsyncGet a single contact of a certain type, using the contact's external id. The dynamic fields of the response object depend on the current configuration.
ContactsV_GetContactByTypeAndKeyValueAsyncGet a single contact of a certain type, using a key value that corresponds to the current instance configuration. This can only be used for contact types with exactly ONE key. The dynamic fields of the response object depend on the current configuration.
ContactMessage_GetLatestMessagesByContactIdGet the latest messages (max 500) a contact has received
Transactions_GetTransactionsByContactIdGet all purchase transactions for a single contact with optional offset and number of transactions in response.
BonusPointTransactions_GetBonusPointTransactionsForContact
ContactsV_GetChangedContactIds
OfferPromotions_GetPromotionsForContactGet available promotions for a contact. To filter on redemptionChannelType add it as a query string ?redemptionChannelType=POS It can be POS, ECOM or OTHER
ContactOverview_GetContactIdAsyncGet the contactId for one (or several) contacts using either: - email - socialSecurityNumber - mobilePhone - customKey (the customKey must be configured by your supplier) - any - the any field can contain email, socialSecurityNumber, mobilePhone or the custom key (and are checked in that order)
ContactsV_CreateContactHeaderParamCreate a new, approved contact. If the contacts key identifier (example: Email) already exists : returns the GUID of the first entry found.
ContactsV_PromoteToMemberPromote a contact to a member with one or several required fields.
ContactBulk_CreateContactsInBulk
ContactBulk_UpdateContactsInBulk
ContactPreferences_AcceptsSmsUpdate the preference that indicates whether or not a contact accepts to be contacted via sms. This will also approve an unapproved contact. The primary way of updating a contact preference is through the update contacts endpoint.
BonusPointTransactions_AdjustRewardPointsAdds reward points to a contact.
ContactPreferences_AcceptsEmailUpdate the preference that indicates whether or not a contact accepts to be contacted via email. This will also approve an unapproved contact. The primary way of updating a contact preference is through the update contacts endpoint.
ContactPreferences_AcceptsPostalUpdate the preference that indicates whether or not a contact accepts to be contacted via regular mail. This will also approve an unapproved contact. The primary way of updating a contact preference is through the update contacts endpoint.
AssignPromotion_AssignAssign a promotion (multichannel offer only) to a Contact using the internal Contact Id and the id of the promotion
OfferPromotions_RedeemRedeem a promotion (multichannel offer or mobile swipe) for a Contact using the internal Contact Id Redemption channel can be POS, ECOM or OTHER.
ContactMessage_SmsUnsubscribeContactOptional messageId input if user wants to unsubscribe on specific message instead of last sent Sms
ContactMessage_EmailUnsubscribeContactOptional messageId input if user wants to unsubscribe on specific message instead of last sent email
ContactsV_UpdateContactTypeUpdates the contactType for a contact if all expected contact data is available

ContactsV_Count

Get number of approved contacts. This is a cached value that will be updated with a set frequency (normally once every 20 min).

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/count

Return Type

number

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVCount();

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

ContactsV_GetContactById

Get a single contact, using the unique identifier. The dynamic fields of the response object depend on the current instance configuration.

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactId}

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier (GUID).

Return Type

IApiContact

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVGetContactById('contactId');

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

ContactsV_UpdateContactPost

Update one or several fields of a single contact. Dont send an empty value unless you want it to be empty.

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}

Parameters

NameTypeRequiredDescription
bodyanyThe request body.
contactIdstringContact identifier (GUID).

Return Type

IApiContact

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVUpdateContactPost('contactId', input);

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

ContactsV_DeleteWithHeaderParam

  • HTTP Method: DELETE
  • Endpoint: /api/v2/contacts/{contactId}

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier (GUID).
sourcestringSource system identifier (instance configuration)

Return Type

any

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVDeleteWithHeaderParam('contactId', {
source: 'source',
});

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

ContactsV_CountByContactType

Get number of approved contacts of given type. This is a cached value that will be updated with a set frequency (normally once every 20 min).

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactType}/count

Parameters

NameTypeRequiredDescription
contactTypestringId for contact type, e.g. "member" or "contact"

Return Type

number

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVCountByContactType('contactType');

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

ContactBulk_GetBulkStatus

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/bulk/status

Parameters

NameTypeRequiredDescription
batchIdstringId from bulk contact import

Return Type

any

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactBulkGetBulkStatus({
batchId: 'batchId',
});

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

ContactsV_GetContactByTypeAndKeyValueInUrlAsync

! Please be aware that this endpoint is currently usable with either the key value being provided through ! ! the path or a query param. Hence there being two of the same endpoints. ! ! We recommend that you use the query param version (the first) as it is the more versatile one of the two ! Get a single contact of a certain type, using a key value that corresponds to the current instance configuration. This can only be used for contact types with exactly ONE key. The dynamic fields of the response object depend on the current configuration.

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactType}/bykey/{keyValue}

Parameters

NameTypeRequiredDescription
contactTypestringContact type, e.g. "member".
keyValuestringKey value, e.g. ssn, phone number etc.

Return Type

IApiContact

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVGetContactByTypeAndKeyValueInUrlAsync(
'contactType',
'keyValue',
);

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

ProductRecommendation_GetProductRecommendations

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactId}/productrecommendations

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier (GUID).

Return Type

ProductRecommendationsModel

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.productRecommendationGetProductRecommendations('contactId');

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

ContactRetailKpi_GetPurchaseHistory

Following summary shows the purchase history for a single contact, over all time, 12 months and 24 months.

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactId}/purchasehistorysummary

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier (GUID)

Return Type

PurchaseHistorySummary

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactRetailKpiGetPurchaseHistory('contactId');

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

BackInStockSubscription_GetByContactId

Get back in stock subscriptions for a contact

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactId}/backinstock/subscriptions

Parameters

NameTypeRequiredDescription
contactIdstring

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.backInStockSubscriptionGetByContactId('contactId');

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

ContactsV_GetContactByExternalIdAsync

Get a single contact of a certain type, using the contact's external id. The dynamic fields of the response object depend on the current configuration.

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactType}/byexternalid/{externalId}

Parameters

NameTypeRequiredDescription
contactTypestringContact type, e.g. Member or Contact.
externalIdstringExternal contact id.

Return Type

IApiContact

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVGetContactByExternalIdAsync('contactType', 'externalId');

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

ContactsV_GetContactByTypeAndKeyValueAsync

Get a single contact of a certain type, using a key value that corresponds to the current instance configuration. This can only be used for contact types with exactly ONE key. The dynamic fields of the response object depend on the current configuration.

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactType}/bykey

Parameters

NameTypeRequiredDescription
contactTypestringContact type, e.g. "member".
keyValuestringKey value, e.g. ssn, phone number etc.

Return Type

IApiContact

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVGetContactByTypeAndKeyValueAsync('contactType', {
keyValue: 'keyValue',
});

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

ContactMessage_GetLatestMessagesByContactId

Get the latest messages (max 500) a contact has received

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactId}/messages/latest

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier (GUID).
countnumberMax number of items to take. (Default value 100, Max value 500)

Return Type

ListResultOfApiMessage

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactMessageGetLatestMessagesByContactId('contactId', {
count: 8,
});

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

Transactions_GetTransactionsByContactId

Get all purchase transactions for a single contact with optional offset and number of transactions in response.

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactId}/transactions

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier (GUID)
offsetnumberNumber of items to skip. (Default value 0)
countnumberMax number of items to take. (Default value 100)

Return Type

PagedResultOfTransactionItem

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.transactionsGetTransactionsByContactId('contactId', {
offset: 2,
count: 123,
});

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

BonusPointTransactions_GetBonusPointTransactionsForContact

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactId}/bonuspointtransactions

Parameters

NameTypeRequiredDescription
contactIdstringThe contact identifier (GUID).
offsetnumberThe first item to retrieve. (Default value 0)
countnumberThe max number of items to retrieve. (Default value 100)

Return Type

PagedResultOfBonusPointTransactionModel

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.bonusPointTransactionsGetBonusPointTransactionsForContact('contactId', {
offset: 6,
count: 2,
});

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

ContactsV_GetChangedContactIds

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/changes

Parameters

NameTypeRequiredDescription
changeTypeChangeTypeCreated, Updated or Deleted
fromDatestringStart of timespan (ex 2023-05-04 11:20:00.000)
toDatestringEnd of timespan (Default the current time and date)

Return Type

any

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const changeType = ChangeType.Created;

const { data } = await voyadoEngage.contacts.contactsVGetChangedContactIds({
changeType: changeType,
fromDate: 'fromDate',
toDate: 'toDate',
});

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

OfferPromotions_GetPromotionsForContact

Get available promotions for a contact. To filter on redemptionChannelType add it as a query string ?redemptionChannelType=POS It can be POS, ECOM or OTHER

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/{contactId}/promotions

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier
redemptionChannelTypestringFilter on redemptionChannelType it can be POS, ECOM or OTHER

Return Type

ApiPromotionModel[]

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.offerPromotionsGetPromotionsForContact('contactId', {
redemptionChannelType: 'redemptionChannelType',
});

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

ContactOverview_GetContactIdAsync

Get the contactId for one (or several) contacts using either: - email - socialSecurityNumber - mobilePhone - customKey (the customKey must be configured by your supplier) - any - the any field can contain email, socialSecurityNumber, mobilePhone or the custom key (and are checked in that order)

  • HTTP Method: GET
  • Endpoint: /api/v2/contacts/id

Parameters

NameTypeRequiredDescription
contactTypestring
emailstring
socialSecurityNumberstring
mobilePhonestring
customKeystring
anystring

Return Type

string

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactOverviewGetContactIdAsync({
contactType: 'contactType',
email: 'email',
socialSecurityNumber: 'socialSecurityNumber',
mobilePhone: 'mobilePhone',
customKey: 'customKey',
any: 'any',
});

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

ContactsV_CreateContactHeaderParam

Create a new, approved contact. If the contacts key identifier (example: Email) already exists : returns the GUID of the first entry found.

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts

Parameters

NameTypeRequiredDescription
bodyanyThe request body.
sourcestringSource system identifier (instance configuration)
storeExternalIdstringThe unique id code of the current store (and therefore also the recruited-by store). Not mandatory but strongly recommended.
createAsUnapprovedstringContact is not approved on creation. (Default value false)

Return Type

IApiContact

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVCreateContactHeaderParam(input, {
source: 'source',
storeExternalId: 'storeExternalId',
createAsUnapproved: 'createAsUnapproved',
});

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

ContactsV_PromoteToMember

Promote a contact to a member with one or several required fields.

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}/promoteToMember

Parameters

NameTypeRequiredDescription
bodyanyThe request body.
contactIdstringContact identifier (GUID).
sourcestringSource system identifier (instance configuration)

Return Type

IApiContact

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVPromoteToMember('contactId', input, {
source: 'source',
});

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

ContactBulk_CreateContactsInBulk

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/bulk

Parameters

NameTypeRequiredDescription
bodyanyThe request body.
contactTypestringOptional, if not set the default ContactType will be used

Return Type

string

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactBulkCreateContactsInBulk(input, {
contactType: 'contactType',
});

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

ContactBulk_UpdateContactsInBulk

  • HTTP Method: PATCH
  • Endpoint: /api/v2/contacts/bulk

Parameters

NameTypeRequiredDescription
bodyanyThe request body.
contactTypestringOptional, if not set the default ContactType will be used
avoidTriggeringExportbooleanOptional, default value is false

Return Type

string

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactBulkUpdateContactsInBulk(input, {
contactType: 'contactType',
avoidTriggeringExport: true,
});

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

ContactPreferences_AcceptsSms

Update the preference that indicates whether or not a contact accepts to be contacted via sms. This will also approve an unapproved contact. The primary way of updating a contact preference is through the update contacts endpoint.

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}/preferences/acceptsSms

Parameters

NameTypeRequiredDescription
bodyBoolRequestThe request body.
contactIdstringContact identifier (GUID).

Return Type

IApiContact

Example Usage Code Snippet

import { BoolRequest, VoyadoEngage } from 'voyado_engage';

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

const input: BoolRequest = {
value: true,
};

const { data } = await voyadoEngage.contacts.contactPreferencesAcceptsSms('contactId', input);

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

BonusPointTransactions_AdjustRewardPoints

Adds reward points to a contact.

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}/rewardpointtransaction

Parameters

NameTypeRequiredDescription
bodyApiAdjustRewardPointsThe request body.
contactIdstringContact identifier (GUID).

Return Type

ApiAdjustRewardPointsResponse1

Example Usage Code Snippet

import { ApiAdjustRewardPoints, VoyadoEngage } from 'voyado_engage';

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

const input: ApiAdjustRewardPoints = {
points: 9.34,
description: 'description',
type: 'type',
};

const { data } = await voyadoEngage.contacts.bonusPointTransactionsAdjustRewardPoints('contactId', input);

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

ContactPreferences_AcceptsEmail

Update the preference that indicates whether or not a contact accepts to be contacted via email. This will also approve an unapproved contact. The primary way of updating a contact preference is through the update contacts endpoint.

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}/preferences/acceptsEmail

Parameters

NameTypeRequiredDescription
bodyBoolRequestThe request body.
contactIdstringContact identifier (GUID).

Return Type

IApiContact

Example Usage Code Snippet

import { BoolRequest, VoyadoEngage } from 'voyado_engage';

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

const input: BoolRequest = {
value: true,
};

const { data } = await voyadoEngage.contacts.contactPreferencesAcceptsEmail('contactId', input);

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

ContactPreferences_AcceptsPostal

Update the preference that indicates whether or not a contact accepts to be contacted via regular mail. This will also approve an unapproved contact. The primary way of updating a contact preference is through the update contacts endpoint.

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}/preferences/acceptsPostal

Parameters

NameTypeRequiredDescription
bodyBoolRequestThe request body.
contactIdstringContact identifier (GUID).

Return Type

IApiContact

Example Usage Code Snippet

import { BoolRequest, VoyadoEngage } from 'voyado_engage';

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

const input: BoolRequest = {
value: true,
};

const { data } = await voyadoEngage.contacts.contactPreferencesAcceptsPostal('contactId', input);

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

AssignPromotion_Assign

Assign a promotion (multichannel offer only) to a Contact using the internal Contact Id and the id of the promotion

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}/promotions/{promotionId}/assign

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier
promotionIdstringThe id of the promotion

Return Type

any

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.assignPromotionAssign('contactId', 'promotionId');

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

OfferPromotions_Redeem

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

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

Parameters

NameTypeRequiredDescription
bodyRedeemBodyModelThe request body.
contactIdstringContact identifier
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.contacts.offerPromotionsRedeem('contactId', 'promotionId', input);

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

ContactMessage_SmsUnsubscribeContact

Optional messageId input if user wants to unsubscribe on specific message instead of last sent Sms

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}/unsubscribeSms

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier (GUID).
messageIdstringMessage Id (string).

Return Type

any

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactMessageSmsUnsubscribeContact('contactId', {
messageId: 'messageId',
});

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

ContactMessage_EmailUnsubscribeContact

Optional messageId input if user wants to unsubscribe on specific message instead of last sent email

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}/unsubscribeEmail

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier (GUID).
messageIdstringMessage Id (string).

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactMessageEmailUnsubscribeContact('contactId', {
messageId: 'messageId',
});

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

ContactsV_UpdateContactType

Updates the contactType for a contact if all expected contact data is available

  • HTTP Method: POST
  • Endpoint: /api/v2/contacts/{contactId}/updateContactType

Parameters

NameTypeRequiredDescription
contactIdstringContact identifier (GUID).
contactTypeIdstringThe ContactType id (string).

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

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

const { data } = await voyadoEngage.contacts.contactsVUpdateContactType('contactId', {
contactTypeId: 'contactTypeId',
});

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

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →