Toshl Developer

Accounts

Accounts endpoint can be used to interact with users accounts.

Note: Be advised that accounts are subject to free account limitation. If a user with a free account tries to add an account and goes over the alowed number of accounts, a 403 (Forbidden) error will be returned and the account will be discarded.

Resource representation

{
  "id": "42",
  "name": "Tesla model S",
  "balance": 3000,
  "initial_balance": 3000,
  "currency": {
    "code": "USD",
    "rate": 1,
    "fixed": false
  },
  "median": {
    "expenses": 55,
    "incomes": 1300
  },
  "status": "active",
  "order": 0,
  "modified": "2012-09-04T13:55:15Z",
  "goal": {
    "amount": 63570,
    "start": "2013-07-01",
    "end": "2015-07-01"
  }
}

Properties

id
readonly
string

Account id.

parent
read, write
string

Parent account id.

name
read, write
string

Account name.

Max length: 100
name_override (deprecated)
read, write
boolean

Is true if name is overriden with a custom name.

type
read, write
string

Account type

Possible values: custom, depository, credit_card, loan, mortgage, brokerage, investment, savings, other
balance
readonly
number

Account balance.

Minimum: > -1000000000000000
Maximum: < 1000000000000000
initial_balance
read, write
number

Account balance.

Minimum: > -1000000000000000
Maximum: < 1000000000000000
Default value: 0
limit
read, write
number

Account limit. If no limit is set null is returned

Minimum: > -1000000000000000
Maximum: < 1000000000000000
currency
read, write
object

Currency object

code
read, write
string

Account currency code.

Regex: [A-Z0-9_]{2,10}
rate
read, write
number

Account exchange rate calculated according to users currency. If not set (and currency differs from main currency) the daily exchange rate should be used.

Minimum: > 0
main_rate
readonly
number

Entry exchange rate main currency calculated according to entry main currency.

fixed
read, write
boolean

If set to true, the exchange rate is fixed.

Default value: false
daily_sum_median
readonly
object

Calculated median of daily sums of expenses and incomes.

expenses
readonly
number

Median of daily sums of expenses.

Minimum: >= 0
Maximum: < 1000000000000000
Default value: 0
incomes
readonly
number

Median of daily sums of incomes.

Minimum: >= 0
Maximum: < 1000000000000000
Default value: 0
avg
read, write
object

Account average

expenses
readonly
number

Monthly expense sum avg

Minimum: >= 0
Maximum: < 1000000000000000
Default value: 0
incomes
readonly
number

Monthly income sum

Minimum: >= 0
Maximum: < 1000000000000000
Default value: 0
status
readonly
string

Account status.

Possible values: active, inactive, archived
order
read, write
integer

Account order.

Minimum: >= 0
Maximum: =< 255
modified
readonly
string

Specifies when the account was last modified.

goal
read, write
object

If account is a savings goal this includes a savings goal object.

amount
read, write
number

Desired amount to save.

Minimum: > 0
Maximum: < 1000000000000000
start
read, write
string

Savings goal start date in YYYY-MM-DD format.

Format: date
end
read, write
string

Savings goal end date in YYYY-MM-DD format.

Format: date
connection
read, write
object

If account is connected to an institution connection (bank etc.) this object includes details about the connection

id
read, write
string

Connection id

name
read, write
string

Connection name

status
read, write
string

Connection status. connected means all is well, disconnected means sync is disabled, inactive means pro is needed to reactivate, error means there is an error with the connection and a re-login is required.

Possible values: connected, disconnected, inactive, error
logo
readonly
string

Institution logo url if institution has a logo.

settle
read, write
object

If account is set to automatically settle each month this object includes details about the settle day of the month.

byday
read, write
string

A comma separated list of weekdays (MO,TU..). Each weekday can have be preceded by a positive or negative number (1MO - 1st monday of the month/year, -1MO - last monday of the month/year).

bymonthday
read, write
string

A comma separated list of month days (1-31). Each month day can have a plus(+) or minus(-) prefix.

bysetpos
read, write
string

A comma separater list of the nth occurance within bymonthday.

billing
read, write
object

If account is set to automatically settle each month this object includes details about the billing day of the month.

byday
read, write
string

A comma separated list of weekdays (MO,TU..). Each weekday can have be preceded by a positive or negative number (1MO - 1st monday of the month/year, -1MO - last monday of the month/year).

bymonthday
read, write
string

A comma separated list of month days (1-31). Each month day can have a plus(+) or minus(-) prefix.

bysetpos
read, write
string

A comma separater list of the nth occurance within bymonthday.

count
read, write
integer

Number of times the account has been used.

review
readonly
integer

Number of entries to review.

deleted
readonly
boolean

Is object deleted.

recalculated
readonly
boolean

Is true if account balance has been calculated (if false try pulling again until true).

extra
read, write
object

A custom JSON object that you can use to extend Toshl API. Whatever you save into this field you will get back whenever you fetch it later.

* denotes required field/parameter.