Loading...

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

Description

Removes a given account from the system. Note that this does not actually remove the account record, but rather changes its status to inactive.

Path Parameters

accountId integer ID of account to disable required

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;

const int accountId = XXXX;

var context = new T70Context();

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

var account = accountRepo.Get(accountId);

accountRepo.Delete(account);

}

}