Loading...

POST   https://api.3seventy.com/api/v2.1/account

Description

Creates a new account in the system with the specified details.

Request Properties application/json

ParentId integer The identifier of the account that is the parent of this account. required
Name string The name of the account required
Channels array[integer] Optional list of channels to allow the contact to use. optional
Attributes array[object] List of attributes to set for this account. optional
 {
    "ParentId": 22,
    "Name": "370 AutomatedTest Account"
  }

Response Properties application/json

Id integer The ID of the account.
Status string The current status of the account.
ParentId integer The identifier of the account that is the parent of this account.
Name string The name of the account
Created string When the account was created.
AllowCallback boolean Set if this account is allowed to use the callback mechanism.
CallbackToken string The token to send on a callback.
BillingStatus string Billing Status Information
BillingType string Billing Type Information
  {
    "Id": 23,
    "Status": 0,
    "ParentId": 22,
    "Name": "370 AutomatedTest Account",
    "Created": "2013-12-19T14:44:17",
    "AllowCallback": false,
    "CallbackToken": null,
    "BillingStatus": null,
    "BillingType": null,
    "Type": 0,
    "AccountType": 0,
    "IsMetered": false,
    "IsPayAsYouGo": false
  }

C#


using System;
using System.Collections.Generic;
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 parentId= XXXX;

var context = new T70Context();

var accountRepo = context.Repository<Account>(new { ParentId = parentId });

var account = new Account

{

ParentId = parentId,

Name = string.Format("APISDK_Test_{0}",Guid.NewGuid())

};

accountRepo.Add(account);

}

}