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
multichannel_promotions_get_by_idGets the multichannel promotion with the identifier which is set by Voyado
multichannel_promotions_updateUpdates an existing multichannel promotion.
Only multichannel promotion in status 'Draft' can be updated.
multichannel_promotions_delete_by_idOnly unassigned multichannel promotions can be deleted
multichannel_promotions_get_validity_by_idGets the multichannel promotion with the identifier which is an internal reference for Voyado
multichannel_promotions_update_validityUpdates duration of an existing multichannel promotion.
Only multichannel promotion in status 'Draft' can be updated.
multichannel_promotions_get_by_external_idGets the multichannel promotion with the identifier which is an external reference for Voyado
multichannel_promotions_createOnly creates multichannel promotion in status 'Draft'.
multichannel_promotions_delete_by_external_idOnly unassigned multichannel promotions can be deleted
multichannel_promotions_get_by_validity_external_idGets the multichannel promotion validity with the identifier which is an external reference for Voyado
offer_promotions_redeem_by_promotion_idRedeem a promotion (multichannel offer or mobile swipe) for a Contact using the internal promotion Id

Redemption channel can be POS, ECOM or OTHER. | |offer_promotions_reactivate_promotion_code| Reactivate a redeemed reward voucher |

multichannel_promotions_get_by_id

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

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

Parameters

NameTypeRequiredDescription
id_strPromotion identifier from Voyado

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.promotions.multichannel_promotions_get_by_id(id_="id")

print(result)

multichannel_promotions_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
request_bodyMultichannelPromotionModelThe request body.
id_strVoyado multichannel promotion identifier

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment
from voyado_engage.models import MultichannelPromotionModel

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = MultichannelPromotionModel(
id_="00000000-0000-0000-0000-000000000000",
status="Ended",
external_id="externalId",
name="name",
validity={
"start_date": "startDate",
"end_date": "endDate",
"assigned_validity": {
"unit": "Months",
"amount": 2103185352
}
},
presentation={
"heading": "heading",
"description": "description",
"link": "link"
},
redemption_channels=[
{
"type_": "POS",
"value_type": "PERCENT",
"value": "value",
"local_values": [
{}
],
"instruction": "instruction"
}
]
)

result = sdk.promotions.multichannel_promotions_update(
request_body=request_body,
id_="id"
)

print(result)

multichannel_promotions_delete_by_id

Only unassigned multichannel promotions can be deleted

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

Parameters

NameTypeRequiredDescription
id_strVoyado identifier to a multichannel promotion

Return Type

StatusCodeResult

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.promotions.multichannel_promotions_delete_by_id(id_="id")

print(result)

multichannel_promotions_get_validity_by_id

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
id_strIdentifier inside of Voyado

Return Type

PromotionValidityModel

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.promotions.multichannel_promotions_get_validity_by_id(id_="id")

print(result)

multichannel_promotions_update_validity

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
request_bodyPromotionValidityModelThe request body.
id_strVoyado multichannel promotion identifier

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment
from voyado_engage.models import PromotionValidityModel

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = PromotionValidityModel(
start_date="startDate",
end_date="endDate",
assigned_validity={
"unit": "Months",
"amount": 2103185352
}
)

result = sdk.promotions.multichannel_promotions_update_validity(
request_body=request_body,
id_="id"
)

print(result)

multichannel_promotions_get_by_external_id

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

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

Parameters

NameTypeRequiredDescription
external_idstrExternal identifier outside of Voyado

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.promotions.multichannel_promotions_get_by_external_id(external_id="externalId")

print(result)

multichannel_promotions_create

Only creates multichannel promotion in status 'Draft'.

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

Parameters

NameTypeRequiredDescription
request_bodyMultichannelBasePromotionModelThe request body.

Return Type

MultichannelPromotionModel

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment
from voyado_engage.models import MultichannelBasePromotionModel

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = MultichannelBasePromotionModel(
external_id="externalId",
name="name",
validity={
"start_date": "startDate",
"end_date": "endDate",
"assigned_validity": {
"unit": "Months",
"amount": 2103185352
}
},
presentation={
"heading": "heading",
"description": "description",
"link": "link"
},
redemption_channels=[
{
"type_": "POS",
"value_type": "PERCENT",
"value": "value",
"local_values": [
{}
],
"instruction": "instruction"
}
]
)

result = sdk.promotions.multichannel_promotions_create(request_body=request_body)

print(result)

multichannel_promotions_delete_by_external_id

Only unassigned multichannel promotions can be deleted

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

Parameters

NameTypeRequiredDescription
external_idstrExternal identifier to a multichannel promotion

Return Type

StatusCodeResult

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.promotions.multichannel_promotions_delete_by_external_id(external_id="externalId")

print(result)

multichannel_promotions_get_by_validity_external_id

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
external_idstrExternal identifier outside of Voyado

Return Type

PromotionValidityModel

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.promotions.multichannel_promotions_get_by_validity_external_id(external_id="externalId")

print(result)

offer_promotions_redeem_by_promotion_id

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
request_bodyRedeemBodyModelThe request body.
promotion_idstrThe id of the promotion

Return Type

dict

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment
from voyado_engage.models import RedeemBodyModel

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = RedeemBodyModel(
redemption_channel="redemptionChannel"
)

result = sdk.promotions.offer_promotions_redeem_by_promotion_id(
request_body=request_body,
promotion_id="promotionId"
)

print(result)

offer_promotions_reactivate_promotion_code

Reactivate a redeemed reward voucher

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

Parameters

NameTypeRequiredDescription
id_strThe id of the reward voucher

Return Type

str

Example Usage Code Snippet

from voyado_engage import VoyadoEngage, Environment

sdk = VoyadoEngage(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.promotions.offer_promotions_reactivate_promotion_code(id_="id")

with open("output-file.ext", "w") as f:
f.write(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →