Update entry
Update an entry. Some related data is updated asynchronously. If entry is part of a repeat clients can set an additional GET parameter update
which dictates which entries in the repeat to update. Possible values are:
all | Updates all entries in the repeat. |
one | Updates only the sent entry. |
tail | Updates the sent entry and all following. |
If update
parameter is not specified the default value is all.
Note: When using the update
parameter, all changes made on the entries will be lost.
If entry is part of a repeat clients can set an additional GET parameters delete_after_date
or delete_after_count
which dictates that entries in the repeat after specified date or specified count will be deleted.
PUT /entries/{id}
Required scope:
- entries:rw
Parameters
id * required string
|
Entry id. |
amount * required number
|
Entry amount Minimum:> -1000000000000000 Maximum: < 1000000000000000 |
currency * required object
|
Currency object |
code * required string
|
Entry currency code. Regex:[A-Z0-9_]{2,10} |
rate optional number
|
Entry exchange rate calculated according to entry account currency. Minimum:> 0 |
main_rate optional number
|
Entry exchange rate main currency calculated according to entry main currency. |
fixed optional boolean
|
If set to true, the exchange rate is fixed. Default value:false |
date * required string
|
Entry purchase date in date |
desc optional string
|
Entry description. Max length:255 |
account * required string
|
Entry account id. |
category * required string
|
Entry category id. |
tags optional array
|
An array of tag ids. |
location optional object
|
Entry entry location object. |
id optional string
|
Location id. This is the internal Toshl id, not the Foursquare venue id. Not set if user did not select a location. |
venue_id optional string
|
Foursquare venue id. Not set if user did not select a location. |
latitude * required number
|
Location latitude. |
longitude * required number
|
Location longitude. |
modified * required string
|
Specifies when the entry was last modified. |
repeat optional object
|
A repeat object. |
id optional string
|
Repeat id. |
start * required date
|
Repeat start date. |
end optional date
|
Repeat end date. If end date is not specified the |
frequency * required string
|
Repeat frequency. Possible values:daily, weekly, monthly, yearly |
interval * required integer
|
Repeat interval. For example: repeating every two months -> frequency: >= 1 Maximum: =< 127 |
count optional integer
|
How many times to repeat entry. Minimum:>= 1 |
byday optional string
|
A comma separated list of weekdays ( |
bymonthday optional string
|
A comma separated list of month days (1-31). Each month day can have a plus(+) or minus(-) prefix. |
iteration optional number
|
Repeat iteration number. First entry in the repeat has >= 0 |
transaction optional object
|
A transaction object. |
id optional string
|
Companion entry id. |
account * required string
|
Companion entry account. |
currency * required object
|
Companion entry currency object |
code * required string
|
Entry currency code. Regex:[A-Z0-9_]{2,10} |
rate optional number
|
Entry exchange rate calculated according to entry account currency. Minimum:> 0 |
main_rate optional number
|
Entry exchange rate main currency calculated according to entry main currency. |
fixed optional boolean
|
If set to true, the exchange rate is fixed. Default value:false |
images optional array
|
List of entry images. Each entry can have up to 4 images. Maximum items:4 |
id optional string
|
Image id. |
reminders optional array
|
List of entry reminders. Each entry can have up to 5 reminder. Maximum items:5 |
period optional string
|
Reminder period Possible values:day, week, month, year |
number optional integer
|
The number of periods before entry date -> 2 weeks before date: >= 0 Maximum: =< 255 |
at optional string
|
Time of day for the reminder to fire in time |
completed optional boolean
|
If an entry has a reminder, this field indicates if the bill has been paid or not. Once it has reminders for this entry no longer fire. |
extra optional 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.
Request
$ curl https://api.toshl.com/entries/42?update=all \ -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl" \ -H "Content-Type: application/json" \ -X PUT \ -d '{json}'