Create entry
Create a new entry. Some related data is updated asynchronously.
POST /entries
Required scope:
- entries:rw
Parameters
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 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. |
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. |
bysetpos optional string
|
A comma separater list of the nth occurance within |
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 |
split optional object
|
If entry was created by splitting up another, this object is returned. |
parent * required string
|
Link to parent that was used to create this split entry. |
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 \ -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl" \ -H "Content-Type: application/json" \ -X POST \ -d '{json}'