Warning! Construction underway! Amatino is in an 'alpha' state. Not all features are operational. See roadmap

Primary
Account
Entity
Transaction
Derived
Balance
Ledger
Performance
Position
Recursive Balance
Recursive Ledger
Object
Retrieve
Ancillary
Custom Unit
Entity List
Entry
Global Unit
Global Unit List
Ledger Row
Price
Session
Side
Tx Version List
Tree Node
Type
User
User List

Tree

Trees present the entire chart of Accounts of an Entity. in a single hierarchical object.

Each Account is nested under its parent, and in turn lists all its children, all providing Balances and Recursive Balances.

Trees are trimmed for permissions. If the user requesting the tree only has read access to a subset of Accounts, they will only receive a tree containing those accounts, with placeholder objects filling the place of Accounts they are not permitted to read.

Each Account in the Tree is presented as a Tree Node.

The Tree Object

Tree objects are returned with the following structure

Root Type

JSON Object

Object Structure

type JSON String
example "oB3cjSNKXklkJ4Tb"
key "entity_id"
description The identifer of the Entity this Tree describes
type JSON String
example "2017-01-01_17:22:16.40288"
key "balance_time"
description Time of the Tree balance, in the format YYYY-MM-DD_HH24:MI:SS.US, in UTC.
type JSON String
example "2018-05-02_05:01:54.72941"
key "generated_time"
description Time that this Balance was computed, in the format YYYY-MM-DD_HH24:MI:SS.US, in UTC
type JSON Number or JSON Null
example 5
key "global_unit_denomination"
description The id of the global unit in which this Tree Balance is denominated, if applicable
type JSON Number or JSON Null
example null
key "custom_unit_denomination"
description The id of the custom unit in which this Tree is denominated, if applicable.
type JSON Array
example See Tree Nodes
key "tree"
description A list of Tree Node objects
list objects Tree Node

Retrieve Tree

API Path /trees
HTTP Method GET
Description Descr. Retrieve a Tree

Required Headers

Key X-Signature
Value Your Session signature
Example "yxATCPRKAAXHNiPctNQPHEGGVJF"...
Key X-Session-ID
Value An an integer Session ID
Example 7449059267091272858

Required URL Parameters

Key entity_id
Type string
Description Descr. The entity id of the Entity for which you wish to retrieve a Tree
Example oB3cjSNKXklkJ4Tb
Repeatable No

Required JSON Data

Root type

Object Structure

type JSON String or JSON Null
example "2017-01-01_17:22:16.40288"
key "balance_time"
description Time of the Tree balance, in the format YYYY-MM-DD_HH24:MI:SS.US, in UTC. Specify null for balance at request time.
type JSON Number or JSON Null
example 5
source /units/list
key "global_unit_denomination"
description The id of the global unit denomination in which you would like to view the Tree. Specify either global or custom unit denomination.
type JSON Number or JSON Null
example null
source /custom_units/list
key "custom_unit_denomination"
description The id of the custom unit in which you would like to view the Ledger, if desired. Specify either global or custom unit denomination

Returns

Root Type

JSON Object

Object

Tree