Loading...

Description

Updates a template to a new format.


Request URL

PUT   https://api.3seventy.com/api/v2.1/account/{accountId}/content/{contentId}/template/{templateId}

Request Properties

Parameter Description Mandatory
accountId The account ID which owns the content group. Yes
contentId The content group which the template will be contained within. Yes
templateId The specific template ID to update. Yes
LanguageId The language this template is for. No
ChannelTypeId The type of channel this content can be sent to. Yes
EncodingTypeId The format of the tempalte data No
Template The actual template Yes
ImageId ID of image to send No

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 int contentTemplateId = XXX;

const int contentId = XXX;

var context = new T70Context();

var contentTempRepo = context.Repository<ContentTemplate>(new {AccountId = accountId, ContentId = contentId});

var item = contentTempRepo.Get(contentTemplateId);

item.EncodingType = EncodingType.Razor;

contentTempRepo.Update(item);

}

}

 

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