Budgets
Budgets endpoint can be used to interact with users budgets. Endpoint returns only active budgets (can also return deleted budgets if include_deleted
is true). If a client does not know how to calculate a budgets history it can set expand
to true
and the API will do the work. For this to work well, please include from
and to
whenever possible.
Note: Only one active monthly budget for all expenses can exist at any one time. If a user tries to add a second general monthly budget, a 403 (Forbidden) error will be returned and the budget will be discarded.
Note: Be advised that budgets are subject to free account limitation. If a user with a free account tries to add a third budget, a 403 (Forbidden) error will be returned and the budget will be discarded.
Resource representation
Properties
id readonly string
|
Budget id. |
parent readonly string
|
Budget parent id. |
name read, write string
|
Budget name. Max length:300 |
limit read, write number
|
Budget limit. Minimum:> -1000000000000000 Maximum: < 1000000000000000 |
limit_planned readonly number
|
Planned budget limit is the limit based only on planned incomes. Minimum:> -1000000000000000 Maximum: < 1000000000000000 |
amount readonly number
|
Budget amount, always calculated into budget >= 0 Maximum: < 1000000000000000 |
planned readonly number
|
Planned amount is the amount of expenses that will fall into the budget after today. Minimum:>= 0 Maximum: < 1000000000000000 |
history_amount_median readonly number
|
Budget history amount median. Minimum:>= 0 Maximum: < 1000000000000000 |
currency read, write object
|
Currency object |
code read, write string
|
Budget currency code. Currency code is updatable only if all iterations are updated, or if budget is non repeating Regex:[A-Z0-9_]{2,10} |
rate read, write number
|
Budget exchange rate calculated according to users currency. If not set (and currency differs from main currency) the daily exchange rate will 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 not refreshed on next budget iteration. Default value:false |
from readonly string
|
Budget start date. Format:date |
to readonly string
|
Budget end date. Format:date |
rollover read, write boolean
|
Boolean which determines if rollover is enabled for budget. If rollover is enabled whatever is left of the budget |
rollover_override read, write boolean
|
Is true if rollover is overriden with a custom amount (can be useful for smart clients). |
rollover_amount read, write number
|
Budget rollover amount. If client updates this the rollovers from previous months are not transferred anymore. Minimum:> -1000000000000000 Maximum: < 1000000000000000 Default value: 0 |
rollover_amount_planned readonly number
|
Planned budget rollover amount. It takes into account aonly planned expenses. Minimum:> -1000000000000000 Maximum: < 1000000000000000 Default value: 0 |
modified readonly string
|
Specifies when the budget was last modified. |
recurrence read, write object
|
Recurrence object. |
frequency read, write string
|
Budget frequency. Possible values:one-time, daily, weekly, monthly, yearly |
interval read, write integer
|
Budget interval. Minimum:>= 1 Maximum: =< 127 |
start read, write string
|
Budget start date in date |
end read, write string
|
Budget end date in date |
byday read, write string
|
A weekday ( |
bymonthday read, write string
|
A comma separated list of unique month days (1-31). Each month day can have a plus(+) prefix. Only one month day can be specified due to the nature of budgets. In the case of |
bysetpos read, write string
|
A comma separater list of the nth occurance within |
iteration readonly integer
|
Budget iteration number. First budget in iteration has >= 0 |
status readonly string
|
Budget status. Budget can have an inactive state if users pro account has expired. Possible values:active, inactive, archived |
type read, write string
|
Budget type. Possible values:regular, delta, percent |
percent read, write number
|
Percent of monthly income. Minimum:> 0 |
delta read, write number
|
Used to define monthly budget -/+ delta. |
order read, write integer
|
Budget order. Minimum:>= 0 Maximum: =< 255 |
tags read, write array
|
An |
!tags read, write array
|
An |
categories read, write array
|
An |
!categories read, write array
|
An |
accounts read, write array
|
An |
!accounts read, write array
|
An |
deleted readonly boolean
|
Is object deleted. |
recalculated readonly boolean
|
Is |
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. |
problem read, write object
|
Budget problem info object |
id read, write string
|
Id of the problem. |
description read, write string
|
Description of the problem. |
deleted_accounts read, write array
|
An |
deleted_tags read, write array
|
An |
deleted_categories read, write array
|
An |
* denotes required field/parameter.