Loading...

POST   https://api.3seventy.com/api/v2.1/account/{accountId}/campaign/{campaignId}/couponOffer

Description

Creates the Coupon Campaign offer.

Path Parameters

accountId integer Account Id required
campaignId integer Campaign Id required

Request Properties application/json

RegularOffer string Regular offer (without coupon) required
NewOffer string Coupon offer required
ImageUrl string Offer image ID required
TermsAndConditions string Terms and conditions of this offer optional
UrlBase string URL to use as base when sending to user optional


                    

Response Properties application/json

AccountId integer The account this offer belongs to
CampaignId integer The campaign this offer is for
ImageURL string Offer image URL
NewOffer string Coupon offer (when coupon applied)
RegularOffer string Regular offer (without coupon)
TermsAndConditions string Terms and conditions of this offer
UrlBase string URL to use as base when sending to user


                    

C#


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 int campaignId = XXXX;

var context = new T70Context();

var couponOfferRepo = context.Repository<CouponOffer>(new { AccountId = accountId, CampaignId = campaignId });

var item = new CouponOffer()

{

AccountId = accountId,

CampaignId = campaignId,

NewOffer = "",

ImageURL = "",

RegularOffer = ""

};

couponOfferRepo.Add(item);

}

}