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

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
example 42
key "account_id"
description An identifier for this account, unique within an Entity
type JSON String
example "Subscription Income"
key "name"
description A friendly name for this account
type JSON number
example 2
key "type"
description The type id of the account, one of asset, liability, income, expense, or equity.
type JSON Number
example 69
key "parent_account_id"
description Identifier for this account's parent, unique within an Entity.
type JSON Number or JSON Null
example 5
key "global_unit_id"
description Identifier of this account's denominating Global Unit, if one exists
type JSON Number or JSON Null
example 42
key "custom_unit_id"
description Identifier of this account's denominating Custom Unit, if one exists
type JSON String or JSON Null
example "oB3cjSNKXklkJ4Tb"
key "counterparty_entity_id"
description The ID of a counterparty Entity, if one exists
type JSON String
example "Revenue from sale of double-entry accounting services"
key "description"
description Friendly description of this account
type JSON String
example "#42f4df"
key "color"
description Hex-color value for this account
type JSON Array of JSON Numbers
example [124, 42, 3411]
key "children"
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
example "Subscription Income"
max char length 1024
key "name"
description Friendly name for the new account
type JSON Number
example 1
source /constants/account_types
key "type"
description The fundamental account Type, i.e asset, liability, income, expense, or equity
type JSON Number or JSON Null
example 42
key "parent_account_id"
description The parent of this new account
note Specify null to add a top-level account
type JSON Number or JSON Null
example 5
note An account must either either specify a Global Unit or a Custom Unit, but not both
source /unit/list
key "global_unit_id"
description The Global Unit denomination of this new account, if desired
type JSON Number or JSON Null
example 23
note An account must either either specify a Global Unit or a Custom Unit, but not both
source /custom_unit/list
key "custom_unit_id"
description The Custom Unit denomination of this new account, if desired
type JSON String or JSON Null
example "oB3cjSNKXklkJ4Tb"
key "counterparty_entity_id"
description An ID of an Entity that is counterparty of this new account, if desired
type JSON String
example "Revenue from sale of double-entry accounting services"
max char length 1024
key "description"
description Friendly description of the new account
type JSON String or JSON Null
example "#42f4df"
key "color"
description Hex-color value for this account
note Accounts created with a null color value will default to #FFFFFF

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

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

Returns

Root Type

JSON Array

Object Structure

type JSON Number
example 42
key "account_id"
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