Current user

To get the current user use the endpoint GET /me.

Favorites

Also see Favorites.

Password

To change the user’s password you need to pass the current password, the new password and the confirmation of the new password.

$ curl -X PUT -d '{"user": {"current_password": "N0tSoGood", "password": "j9mifj2Sju", "password_confirmation": "j9mifj2Sju"}}' http://api.adviseonly.com/users/john-smith

Please note that you can safely update a user changing attributes other than the password by simply omitting the password related parameters.

$ curl -X PUT -d '{"user": {"last_name": "Doe"}}' http://api.adviseonly.com/users/john-smith

Portfolios

Also see Portfolios.

Also see Search.

Resource representations

{
  "kind": "user",
  "id": integer,
  "name": string,
  "first_name": string,
  "last_name": string,
  "email": string,
  "slug": string,
  "favorite_count": integer,
  "has_active_subscriptions": boolean,
  "portfolio_count": integer,
  "do_it_yourself_portfolio_limit": integer,
  "do_it_yourself_portfolio_count": integer,
  "biography": string,
  "birthday": date,
  "city": string,
  "website": string,
  "language": string,
  "fiscal_code": string,
  "created_at": datetime,
  "updated_at": datetime
}

Methods


GET /me
Get a user.

GET /users/:id
Get a user.

Get a user.

Params

Param Name Description
id
Required

The slug of the user to get.


Value:

Must be String


PATCH /users/:id
Update a user.

PUT /users/:id
Update a user.

Update a user.

Params

Param Name Description
id
Required

The slug of the user to update.


Value:

Must be String

user
Required

User data.


Value:

Must be a Hash

user[first_name]
Optional

The first name of the user.


Value:

Must be String

user[last_name]
Optional

The last name of the user.


Value:

Must be String

user[biography]
Optional

The short biography of the user.


Value:

Must be String

user[birthday]
Optional

The birthday of the user.

user[city]
Optional

The city of the user.


Value:

Must be String

user[website]
Optional

The website of the user.


Value:

Must be String

user[language]
Optional

The language of the user. The site should be shown to the user using this language.


Value:

Must be one of: en, it.

user[fiscal_code]
Optional

fiscal_code of Italian user.


Value:

Must be String

user[interests]
Optional

The list of interests of the user.


Value:

Must be an array of any type

user[signup_completed]
Optional

Whether the user has completed the signup process.


Value:

Must be ‘true’ or ‘false’

user[current_password]
Optional

The current password of the user.

This parameter is required only when changing the user’s password.


Value:

Must be String

user[password]
Optional

The new password of the user.

To change the user’s password the current password is required.


Value:

Must be String

user[password_confirmation]
Optional

The confirmation of the new password of the user.


Value:

Must be String