Ledgers
This page includes documentation on managing general ledger accounts, entries and reports.
Updating and deleting accounts, entries or reports is not possible.
LEDGERS
Package ledgers allows managing general ledgers.
CreateAccount
POST
/v1/ledgers/accountsCreates a new GL account..
| Name | Description | Type |
|---|---|---|
| account_id | The ID of the account | String |
| name | The name of the account | String |
| description | The description of the account | String |
| amount | The balance of the account | Amount |
| activated | True if the account is active | Boolean |
| allow_manual_entries | True if manual entries are allowed | Boolean |
| gl_code | The general ledger code used to identify the account type | String |
| migration_event_id | The ID of the migration event that created the GL account | String |
| strip_trailing_zeros | A flag to strip trailing zeros | Boolean |
| type | The type of the account | AccountType |
| usage | The usage of the account | Usage |
| create_time | The time at which the account was created | Timestamp |
| update_time | The time at which the account was last updated | Timestamp |
-
Name Description Type account_id The ID of the account String name The name of the account String description The description of the account String amount The balance of the account Amount activated True if the account is active Boolean allow_manual_entries True if manual entries are allowed Boolean gl_code The general ledger code used to identify the account type String migration_event_id The ID of the migration event that created the GL account String strip_trailing_zeros A flag to strip trailing zeros Boolean type The type of the account AccountType usage The usage of the account Usage create_time The time at which the account was created Timestamp update_time The time at which the account was last updated Timestamp
ListAccounts
GET
/v1/ledgers/accountsLists GL accounts..
Parameters| Name | Description | Type |
|---|---|---|
| Query Parameters | ||
| page_token | The page token to use for the request | String |
| page_size | The page size to use for the request | Integer |
| order_by | The field to order the results by | String |
| filter | The filter to use for the request | String |
-
Name Description Type total The total number of accounts matching the filter Integer remaining The number of accounts remaining in the list, including the accounts in the response Integer accounts The list of GL accounts Array[Account] next_page_token The next page token to use for the request String
GetAccount
GET
/v1/ledgers/accounts/{AccountID}Retrieves a GL account..
Parameters| Name | Description | Type |
|---|---|---|
| Query Parameters | ||
| account_id | The ID of the GL account to retrieve | String |
-
Name Description Type account_id The ID of the account String name The name of the account String description The description of the account String amount The balance of the account Amount activated True if the account is active Boolean allow_manual_entries True if manual entries are allowed Boolean gl_code The general ledger code used to identify the account type String migration_event_id The ID of the migration event that created the GL account String strip_trailing_zeros A flag to strip trailing zeros Boolean type The type of the account AccountType usage The usage of the account Usage create_time The time at which the account was created Timestamp update_time The time at which the account was last updated Timestamp
CreateEntries
POST
/v1/ledgers/entriesCreates GL Journal Entries..
| Name | Description | Type |
|---|---|---|
| transaction_id | The ID of the transaction | String |
| branch_id | The ID of the branch that created the entry | String |
| book_time | The time the entry was recorded into accounting | Timestamp |
| credits | A list of credit entries to create | Array[EntryAmount] |
| debits | A list of debit entries to create | Array[EntryAmount] |
| notes | The extra human-readable notes for the entries | String |
-
Name Description Type entries The list of created entries Array[Entry]
ListEntries
GET
/v1/ledgers/entriesLists GL Journal Entries..
Parameters| Name | Description | Type |
|---|---|---|
| Query Parameters | ||
| page_token | The token of the page to retrieve | String |
| page_size | The number of items to retrieve per page | Integer |
| order_by | The field to order the results by | String |
| filter | The filter to apply to the list | String |
-
Name Description Type total The total number of entries matching the filter Integer remaining The number of entries remaining in the list, including the entries in the response Integer entries The list of entries Array[Entry] next_page_token The token of the next page String
GetEntry
GET
/v1/ledgers/entries/{EntryID}Retrieves the specified GL Journal entry..
Parameters| Name | Description | Type |
|---|---|---|
| Query Parameters | ||
| entry_id | The ID of the entry to retrieve | String |
-
Name Description Type entry_id The ID of the entry String account_id The ID of the account associated with this entry String branch_id The ID for the branch that created the entry String user_id The ID of the user that triggered the transaction String transaction_id The ID of the transaction that caused this entry String type The type of the entry EntryType product_id The ID of the product of the account String product_type The type of product of the account ProductType amount The amount in the entry Amount accounting_rate The accounting rate used for conversion in the transaction AccountingRate notes The extra human-readable notes for the entry String reversal_entry_id The ID of the entry that reverses this entry if it has been reversed String create_time The time the entry was created Timestamp book_time The time the entry was recorded into accounting Timestamp
REPORTS
Package reports allows creating and retrieving Accounting Reports.
CreateReport
POST
/v1/reportsCreates an accounting report..
| Name | Description | Type |
|---|---|---|
| balance_types | The types of balance to include in the report | Array[BalanceType] |
| branch_id | The ID of the branch to filter GL Journal Entries by | String |
| currency_code | The code of the currency to filter GL Accounts by | String |
| account_types | The list of GL Account types to filter by | Array[AccountType] |
| start_time | The starting time of GL Journal Entries to filter by (inclusive) | Timestamp |
| end_time | The ending time of GL Journal Entries to filter by (inclusive) | Timestamp |
ListReports
GET
/v1/reportsLists the reports..
Parameters| Name | Description | Type |
|---|---|---|
| Query Parameters | ||
| page_token | The token of the page to retrieve | String |
| page_size | The number of results to return per page | Integer |
| order_by | The field to order the results by | String |
| filter | The filter to apply to the results | String |
-
Name Description Type total The total number of reports matching the filter Integer remaining The number of reports remaining in the list, including the reports in the response Integer reports The list of reports Array[Report] next_page_token The token of the next page String
GetReport
GET
/v1/reports/{ReportID}Retrieves an accounting report..
Parameters| Name | Description | Type |
|---|---|---|
| Query Parameters | ||
| report_id | The ID of the report | String |
Account
A general ledger (GL) account..
| Name | Description | Type |
|---|---|---|
| account_id | The ID of the account | String |
| name | The name of the account | String |
| description | The description of the account | String |
| amount | The balance of the account | Amount |
| activated | True if the account is active | Boolean |
| allow_manual_entries | True if manual entries are allowed | Boolean |
| gl_code | The general ledger code used to identify the account type | String |
| migration_event_id | The ID of the migration event that created the GL account | String |
| strip_trailing_zeros | A flag to strip trailing zeros | Boolean |
| type | The type of the account | AccountType |
| usage | The usage of the account | Usage |
| create_time | The time at which the account was created | Timestamp |
| update_time | The time at which the account was last updated | Timestamp |
AccountType
The types of GL accounts..
| Name | Description |
|---|---|
| Asset | |
| Liability | |
| Equity | |
| Income | |
| Expense |
Entry
An entry in a general ledger (GL) journal..
| Name | Description | Type |
|---|---|---|
| entry_id | The ID of the entry | String |
| account_id | The ID of the account associated with this entry | String |
| branch_id | The ID for the branch that created the entry | String |
| user_id | The ID of the user that triggered the transaction | String |
| transaction_id | The ID of the transaction that caused this entry | String |
| type | The type of the entry | EntryType |
| product_id | The ID of the product of the account | String |
| product_type | The type of product of the account | ProductType |
| amount | The amount in the entry | Amount |
| accounting_rate | The accounting rate used for conversion in the transaction | AccountingRate |
| notes | The extra human-readable notes for the entry | String |
| reversal_entry_id | The ID of the entry that reverses this entry if it has been reversed | String |
| create_time | The time the entry was created | Timestamp |
| book_time | The time the entry was recorded into accounting | Timestamp |
EntryAmount
The amount modified by an entry..
| Name | Description | Type |
|---|---|---|
| amount | The amount that was debited or credited | Amount |
| code | The code for the GL Account that was debited or credited | String |
EntryType
The type of entry..
| Name | Description |
|---|---|
| Debit | |
| Credit |
NewEntries
The list of entries to create..
| Name | Description | Type |
|---|---|---|
| transaction_id | The ID of the transaction | String |
| branch_id | The ID of the branch that created the entry | String |
| book_time | The time the entry was recorded into accounting | Timestamp |
| credits | A list of credit entries to create | Array[EntryAmount] |
| debits | A list of debit entries to create | Array[EntryAmount] |
| notes | The extra human-readable notes for the entries | String |
ProductType
The type of product..
| Name | Description |
|---|---|
| Loan | |
| Savings |
Usage
The type of usages of GL accounts..
| Name | Description |
|---|---|
| Transactions | |
| Grouping |
BalanceType
The type of balance..
| Name | Description |
|---|---|
| OpeningBalance | |
| NetChange | |
| ClosingBalance |
Entry
An entry in the GL account report..
| Name | Description | Type |
|---|---|---|
| amounts | The amount of money in the organization's native currency | ReportAmounts |
| foreign_amounts | The amount of money in foreign currency | ReportAmounts |
| gl_account | The account that was debited or credited | Account |
NewReportRequest
The details of the new accounting report to generate..
| Name | Description | Type |
|---|---|---|
| balance_types | The types of balance to include in the report | Array[BalanceType] |
| branch_id | The ID of the branch to filter GL Journal Entries by | String |
| currency_code | The code of the currency to filter GL Accounts by | String |
| account_types | The list of GL Account types to filter by | Array[AccountType] |
| start_time | The starting time of GL Journal Entries to filter by (inclusive) | Timestamp |
| end_time | The ending time of GL Journal Entries to filter by (inclusive) | Timestamp |
Report
The generated accounting report..
| Name | Description | Type |
|---|---|---|
| report_id | The unique ID for the report | String |
| items | The list of items in the report | Array[Entry] |
| status | The current status of the report | Status |
ReportAmounts
The amounts on the accounting report..
| Name | Description | Type |
|---|---|---|
| opening_balance | The opening balance of the GL Account | Amount |
| closing_balance | The closing balance of the GL Account | Amount |
| credits | The amount of credit in the GL Account | Amount |
| debits | The amount of debit in the GL Account | Amount |
| net_change | The net change of the GL Account | Amount |