Loading...

Description

Creates a new account attribute definition.


Request URL

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

Request Properties

Parameter Description Mandatory
accountId The account which is creating the definition. Yes
CategoryId Attribute definition category Yes
DataType The data type of the attribute Yes
Name The name of the attribute. Yes
Inheritable Set if this attribute is inheritable, that is to say that child accounts will get this value from their parents if not directly set. No
Description Freeform description of the attribute. No

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

var context = new T70Context();

var accountAttDefRepo = context.Repository<AccountAttributeDefinition>(new { AccountId = accountId });

var item = new AccountAttributeDefinition()

{

CategoryId = XXX,

DataType = DataType.StringType,

Name = "XXXX"

};

accountAttDefRepo.Add(item);

}

}

 

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