Supported Formats

json

GET /api/users/:user_id/preferences
Lists user preferences

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
404 User Not Found.

Examples

GET /api/users/59c241f6a83dc1219d4f4a9f/preferences
401

Params

Param name Description
user_id
required

User ID

Validations:

  • Must be a String


PUT /api/users/:user_id/preferences
Update user preference

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
404 User Not Found.
404 Preference Not Found
422 Unprocessable UserPreference.

Examples

PUT /api/users/59c241f6a83dc1219d4f4b84/preferences/59c241f6a83dc1219d4f4b86
{
  "preference": {}
}
403

Params

Param name Description
id
required

Preference ID

Validations:

  • Must be a String

user_id
required

User Id

Validations:

  • Must be a String

user_preference
required

UserPreference parameter container

Validations:

  • Must be an Array of nested elements

user_preference[value]
required

Preference value

Validations:

  • Must be a String