Update me
Updates currently logged in user information.
PUT /me
Required scope:
- user:rw
Parameters
id * required string
|
User id. |
first_name optional string
|
Users first name. Max length:150 |
last_name optional string
|
Users last name. Max length:150 |
currency * required object
|
Currency settings |
main * required string
|
Main currency. Regex:[A-Z0-9_]{2,10} |
update optional string
|
Main currency update type. historical, custom, sign |
update_accounts optional boolean
|
If set to true, the accounts will have their exchange rates updated as well |
custom_exchange_rate optional number
|
Must be set if >= 0 |
custom optional object
|
Custom currency. |
code optional string
|
Main currency code. Regex:[A-Z0-9_]{2,10} |
rate optional number
|
Main currency exchange rate. Minimum:>= 0 |
fixed optional boolean
|
If set to true, the exchange rate is fixed. Default value:false |
reference_currency optional string
|
Reference currency used to define the currency. Regex:[A-Z0-9_]{2,10} |
modified * required string
|
Date user details were last modified. |
start_day optional integer
|
User preference for month start day. If set to >= 1 Maximum: =< 31 Default value: 1 |
migration optional object
|
User migration details are returned only for users that were migrated over from the previous system and need to go through a special migration step. |
finished optional boolean
|
If finished is |
locale optional string
|
Users locale |
timezone optional string
|
Users timezone |
country optional string
|
Users country Regex:[A-Z]{2} |
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/me \ -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl" \ -H "Content-Type: application/json" \ -X PUT \ -d '{json}'
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "42",
"email": "john@example.com",
"first_name": "John",
"last_name": "Cleese",
"joined": "2013-06-19T16:23:05+00:00Z",
"modified": "2013-07-19T10:12:35+00:00Z",
"pro": {
"since": "2010-06-01T12:21:10+00:00Z",
"until": "2015-07-01T22:10:12+00:00Z",
"payment": {
"provider": "paypal",
"next": "2015-07-01T22:10:12+00:00Z"
}
},
"currency": {
"main": "XYZ",
"custom": {
"code": "XYZ",
"rate": 1.31,
"fixed": true,
"reference_currency": "USD"
},
"recent": [{
"code": "EUR",
"rate": 1.546,
"fixed": true,
"reference_currency": "USD"
}]
},
"start_day": 5,
"notifications": 3,
"social": ["google", "facebook", "foursquare"],
"steps": ["income", "expense", "budget", "budget_category"],
"limits": {
"accounts": true,
"budgets": true,
"images": true
}
}