Loading...

POST   https://api.3seventy.com/api/v2.1/account/{accountId}/link

Description

Gets the details of a specific link.

Path Parameters

accountId integer The account ID which will own the link. required

Request Properties application/json

CampaignId integer The campaign ID that the link is attached to. optional
LinkTypeId number The type of link this is. required
RequestLocation boolean Set if we should collect user's location when they click the link optional
Name string The name of this link which is used when creating razor templates. required
RedirectURL string The URL we should redirect to. required
ContactAttributeDefinitionId integer A contact attribute ID or name to append as a URL query string. optional
UpdateContactAttributeDefinitionId integer The Contact Attribute ID to be updated optional
UpdateContactAttributeValue string Contact Attribute value to update optional


                    

Response Properties application/json

AccountId integer The account ID which owns the link
CampaignId integer The campaign this link is part of.
ContactAttributeDefinitionId integer The contact attribute ID to append to the URL if desired.
LinkType string Enumeration mapping to LinkTypeId
LinkTypeId number The type of link this is. Either Static or Dynamic
Name string The name of the link.
RedirectURL string The URL we should redirect to.
RequestLocation boolean Set if we should request the user's location before redirecting.
ShortBaseURL string The short URL to use.
UpdateContactAttributeDefinitionId integer The contact attribute ID to be updated.
UpdateContactAttributeValue string The value to update the contact attribute to.


                    

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;

var context = new T70Context();

var linkRepo = context.Repository<Link>(new { AccountId = accountId});

var item = new Link()
{

AccountId = accountId,
LinkType = LinkType.Static,
Name = "Test",
RedirectURL = "http://test.com"

};

linkRepo.Add(item);

}

}