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
Entry
Global Unit
Global Unit List
Ledger Row
Session
Side
Tx Version List
Tree Node
Type
User

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

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

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

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.
key "balance_time"
example "2017-01-01_17:22:16.40288"
type JSON String or JSON Null
description The id of the global unit denomination in which you would like to view the Tree. Specify either global or custom unit denomination.
key "global_unit_denomination"
example 5
source /units/list
type JSON Number or JSON Null
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
key "custom_unit_denomination"
example null
source /custom_units/list
type JSON Number or JSON Null

Returns

Root Type

JSON Object

Object

Tree