Loading...

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

Description

Updates an account with a new set of information.

Path Parameters

accountId integer The ID of the account to update. required

Request Properties application/json

Name string The name of the account required
ParentId integer The identifier of the account that is the parent of this account. optional
Attributes array[object] List of attributes to change on this account. optional
  {
    "ParentId": 22,
    "Name": "370 AutomatedTest Account-Updated"
  }

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-Updated",
     "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 =XXX;

const int accountId= XXXX;

var context = new T70Context();

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

var account = new Account

{

Id = accountId,

Name = string.Format("Updated_APISDK_Test_{0}",accountId)

};

accountRepo.Update(account);

}

}