Loading...

Description

Allows a contact to redeem a coupon code. For static coupon campaigns the "couponCode" must be the same value as the "StaticCode" field in the coupon definition. For dynamic coupon campaigns, the code has the following format: {PREFIX}-{CAMPAIGN}-{CONTACT} Where: {PREFIX} is the "Prefix" value supplied in the coupon definition. {CAMPAIGN} is a specially coded base-32 ID value of the coupon campaign's ID. {CONTACT} is a contact ID with the same special base-32 encoding. The base-32 encoding used is 0-9A-Y, excluding the letters I, O, and S


Request URL

POST   https://api.3seventy.com/api/v2.1/account/{accountId}/event-redeemcoupon

Request Properties

Parameter Description Mandatory
accountId The account which the coupon code reports to Yes
couponCode The coupon code to redeem Yes

C#
PHP


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using ThreeSeventy.Vector.Client;
using ThreeSeventy.Vector.Client.Enums;
using ThreeSeventy.Vector.Client.Models;

public class Program
{

private static void Main(string[] args)
{

const int accountId = XXXX;

const string couponCode = "XXXXX";

var context = new CouponRestContext();

var response = context.RedeemCoupon(accountId, couponCode);

}

}

 

Stay tuned for JAVA code snippet
Stay tuned for RUBY code snippet
Stay tuned for PHP code snippet