Loading...

GET   https://api.3seventy.com/api/v2.1/account/{accountId}/subaccount/{subAccountId}

Description

Gets the child accounts of a supplied sub account.

Path Parameters

accountId integer The ID of a parent to the subaccount we're checking required
subAccountId integer The ID of the subaccount we want to get the children of. required

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
BillingType string Billing Type
[
  {
    "Id": 43511,
    "Status": 0,
    "ParentId": 43510,
    "Name": "Integration Test Sub",
    "Created": "2015-06-02T20:49:46",
    "AllowCallback": true,
    "CallbackToken": null,
    "BillingStatus": null,
    "BillingType": null,
    "Type": 1,
    "AccountType": 1,
    "IsMetered": false,
    "IsPayAsYouGo": false
  },
  {
    "Id": 43657,
    "Status": 0,
    "ParentId": 43510,
    "Name": "Hide subscriptions test",
    "Created": "2015-07-05T21:04:04",
    "AllowCallback": false,
    "CallbackToken": null,
    "BillingStatus": null,
    "BillingType": null,
    "Type": 1,
    "AccountType": 1,
    "IsMetered": false,
    "IsPayAsYouGo": false
  }
]

C#


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 parentId= XXXX;

const int subAccountId = XXXX;

var context = new T70Context();

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

var account = accountRepo.Get(subAccountId);

}

}