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

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

Account

An Account is collection of related economic activity. For example, an Account might represent a bank account, income from a particular client, or entity equity. Many Accounts together compose an Entity.

Accounts themselves are composed of Transactions, and the sum of constituent transactions yield an Account Balance.

The Accounts that compose an Entity may be viewed together as part of the Tree.

The Account Object

When returning an Account to you, Amatino uses the following JSON object structure.

Root Type

JSON Array

Object Structure

type JSON Number
key "account_id"
example 42
description An identifier for this account, unique within an Entity
type JSON String
key "name"
example "Subscription Income"
description A friendly name for this account
type JSON number
key "type"
example 2
description The type id of the account, one of asset, liability, income, expense, or equity.
type JSON Number
key "parent_account_id"
example 69
description Identifier for this account's parent, unique within an Entity.
type JSON Number or JSON Null
key "global_unit_id"
example 5
description Identifier of this account's denominating Global Unit, if one exists
type JSON Number or JSON Null
key "custom_unit_id"
example 42
description Identifier of this account's denominating Custom Unit, if one exists
type JSON String or JSON Null
key "counterparty_entity_id"
example "oB3cjSNKXklkJ4Tb"
description The ID of a counterparty Entity, if one exists
type JSON String
key "description"
example "Revenue from sale of double-entry accounting services"
description Friendly description of this account
type JSON String
key "color"
example "#42f4df"
description Hex-color value for this account
type JSON Array of JSON Numbers
key "children"
example [124, 42, 3411]
description The ids of any children of this Account

Create Account

API Path /accounts
HTTP Method POST
Description Descr. Create a new account or account

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 ID of the Entity in which to create the account(s)
Example oB3cjSNKXklkJ4Tb
Repeatable No

Required JSON Data

Root type

JSON Array

Max Array Length

10

Object Structure

type string
key "name"
example "Subscription Income"
max char length 1024
description Friendly name for the new account
type JSON Number
source /constants/account_types
key "type"
example 1
description The fundamental account Type, i.e asset, liability, income, expense, or equity
type JSON Number or JSON Null
note Specify null to add a top-level account
key "parent_account_id"
example 42
description The parent of this new account
example 5
source /unit/list
description The Global Unit denomination of this new account, if desired
note An account must either either specify a Global Unit or a Custom Unit, but not both
type JSON Number or JSON Null
key "global_unit_id"
example 23
source /custom_unit/list
description The Custom Unit denomination of this new account, if desired
note An account must either either specify a Global Unit or a Custom Unit, but not both
type JSON Number or JSON Null
key "custom_unit_id"
type JSON String or JSON Null
key "counterparty_entity_id"
example "oB3cjSNKXklkJ4Tb"
description An ID of an Entity that is counterparty of this new account, if desired
type JSON String
key "description"
example "Revenue from sale of double-entry accounting services"
max char length 1024
description Friendly description of the new account
type JSON String or JSON Null
note Accounts created with a null color value will default to #FFFFFF
key "color"
example "#42f4df"
description Hex-color value for this account

Returns

Root Type

JSON Array

Object

Account

Retrieve Account

API Path /accounts
HTTP Method GET
Description Descr. Retrieve metadata describing an account or accounts

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. An Amatino Entity ID
Example oB3cjSNKXklkJ4Tb
Repeatable No
Key account_id
Type integer
Description Descr. The ID of the account(s) you wish to retrieve
Example 42
Repeatable Yes

Required JSON Data

None.

Returns

Root Type

JSON Array

Object

Account

Update Account

API Path /accounts
HTTP Method PUT
Description Descr. Update metadata of an existing account or accounts

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 ID of the Entity in which to update an account or accounts
Example oB3cjSNKXklkJ4Tb
Repeatable No

Required JSON Data

Root type

JSON Array

Max Array Length

10

Object Structure

type integer
key "account_id"
example 42
description The ID of the account you wish to update
type string
key "name"
example "Subscription Income"
max char length 1024
description Friendly name for the account
type JSON Number
source /constants/account_types
key "type"
example 1
description The account Type
type JSON Number or JSON Null
note Specify null to add a top-level account
key "parent_account_id"
example 42
description The parent of this account
example 5
source /unit/list
description The Global Unit unit denomination of this account, if desired
note An account must either either specify a Global Unit or a Custom Unit, but not both
type JSON Number or JSON Null
key "global_unit_id"
example 32
source /custom_unit/list
description The Custom Unit denomination of this account, if desired
note An account must either either specify a Global Unit or a Custom Unit, but not both
type JSON Number or JSON Null
key "custom_unit_id"
type JSON String or JSON Null
key "counterparty_entity_id"
example "oB3cjSNKXklkJ4Tb"
description An ID of an Entity that is counterparty of this account, if desired
type JSON String
key "description"
example "Revenue from sale of double-entry accounting services"
max char length 1024
description Friendly description of the account
type JSON String or JSON Null
note Accounts updated with a null color value will default to #FFFFFF
key "color"
example "#42f4df"
description Hex-color value for this account

Returns

Root Type

JSON Array

Object

Account

Delete Account

API Path /accounts
HTTP Method DELETE
Description Descr. Delete an account or accounts

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 ID of the Entity in which to delete an account or accounts
Example oB3cjSNKXklkJ4Tb
Repeatable No

Required JSON Data

Root type

JSON Array

Max Array Length

10

Object Structure

type JSON Number
key "target_account_id"
example 42
description The ID of the account you wish to delete
type JSON Number
key "entry_replacement_account_id"
example 99
description The ID of the account into which entries party to the target should be moved
type JSON Boolean
key "delete_children"
example False
description Specify true to recursively delete all child accounts of the target account
type JSON Number or JSON Null
note Specify null to cause immediate child accounts to become top-level accounts
key "new_parent_account_id"
example 99
description Specify the new parent of any immediate child accounts of the target account, if desired

Returns

Root Type

JSON Array

Object Structure

type JSON Number
key "account_id"
example 42
description The ID of a deleted account

Restore Account

API Path /accounts
HTTP Method PATCH
Description Descr. Restore a deleted account or accounts

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 ID of the Entity in which to restore accounts
Example oB3cjSNKXklkJ4Tb
Repeatable No
Key account_id
Type integer
Description Descr. The ID of the account(s) you wish to restore
Example 42
Repeatable Yes

Required JSON Data

None.

Returns

Root Type

JSON Array

Object

Account