Loading...

Description

Opts a contact out of a subscription. It should be noted that the subscription object is not actually removed. The optin flags are simply set to false.


Request URL

DELETE   https://api.3seventy.com/api/v2.1/account/{accountId}/contact/{contactId}/subscription/{subscriptionId}

Request Properties

Parameter Description Mandatory
accountId The ID of the account which owns the contact Yes
contactId The contact who's subscription is being removed Yes
subscriptionId The ID of the subscription to remove Yes

C#
PHP


using System;
using System.Collections.Generic;
using System.Linq;
using ThreeSeventy.Vector.Client;
using ThreeSeventy.Vector.Client.Models;

public class Program
{

private static void Main(string[] args)
{

const int accountId = XXXX;

const int contactId = XXXXX;

const int subscriptionId = XXXX;

var context = new T70Context();

var contactSubRepo = context.Repository<ContactSubscription>(new { AccountId = accountId, ContactId =contactId });

var item = contactSubRepo.Get(subscriptionId);

contactSubRepo.Delete(item);

}

}

 

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