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
read, write
boolean

Is true if name is overriden with a custom name.

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-Z_]{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
count
read, write
integer

Number of times the account has been used.

deleted
readonly
boolean

Is object deleted.

transient_created
readonly
string

Specifies when the transient data was created in UTC time.

transient_valid_till
readonly
string

Specifies till when the transient data is valid in user’s timezone.

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.