Accounts & Categories
Accounts in the API can represent physical accounts such as bank accounts, credit cards, or lines of credit - but are also used for sales and expense categories (advertising, rent, telecomm, etc). The following account methods are available:
Accounts List
GET https://secure.ledgerble.com/api/1.0/accounts
Returns a list of accounts in the following format:
{
"accounts":
[
{
"id": 45,
"url": "https://secure.ledgerble.com/api/1.0/accounts/45",
"name": "Checking Account",
"type": "asset",
"balance": "1234.56"
}
]
}
The following options are available for filtering:
| Variable | Required? | Description |
|---|---|---|
| type | No | Account type. Can be asset, liability, income, expense, equity. |
| physical | No | Physical account type. Can be bank, credit. |
| no_physical | No | No physical (bank, credit card) accounts will be returned. |
| physical_only | No | Only physical (bank, credit card) accounts will be returned. |
| no_internal | No | No internal accounts (accounts payable / receivable, tax collected, etc) will be returned. |
Get Account
GET https://secure.ledgerble.com/api/1.0/accounts/{ACCOUNT_ID}
Returns a single account in the following format:
{
"account": {
"id": 45,
"name": "Checking Account",
"type": "asset",
"physical": "bank",
"internal": "",
"balance": "1234.56",
"initial_balance": "0.00",
"editable": true,
"display_order": 3
}
}
New Account
POST https://secure.ledgerble.com/api/1.0/accounts
Creates a new account. The following options are available:
| Variable | Required? | Description |
|---|---|---|
| name | Yes | The account name. |
| type | Yes | Account type. Can be asset, liability, income, expense, equity. |
| physical | No | Physical account type. Can be bank, credit. |
| initial_balance | No | For physical accounts: balance of the account at the start of your first fiscal year using Ledgerble. |
Edit Account
POST https://secure.ledgerble.com/api/1.0/accounts/{ACCOUNT_ID}/edit
Updates the existing account with the {ACCOUNT_ID} provided. The options available are the same as those for creating.
Delete Account
POST https://secure.ledgerble.com/api/1.0/accounts/{ACCOUNT_ID}/delete
Deletes the account with the {ACCOUNT_ID} provided.
