Documentation

/users/{userId} [PATCH]

ThoughtFarmer REST API Method: /users/{userId}

Updates an existing user in ThoughtFarmer. Returns the updated user when successful. Only provided fields are updated.

URL:
http://yourserver.com/api/users/{userId}

Response Formats:
JSON, XML

HTTP Method(s):
PATCH

Requires Authentication:
true, user making call must pass a valid token parameter

Parameters:

Parameter Type Description
userId int Required. The user id of the user to update
firstName string(100) The first name of the user to update.
lastName string(100) The last name of the user to update.
email string(255) The email address of the user to update. The email must NOT be already assigned to another user.
salutation string The salutation for this user [ Mrs | Miss | Ms | Mr | Dr ]
preferredName string(100) The preferred name of the user
jobTitle string(100) The job title of this user
phoneTel string(30) The telephone number
phoneFax string(30) The fax number
phoneMobile string(30) The mobile phone number
profileText string The users profile body text
birthday DateTime The users birthday
birthdayDisplay string How the user should have their birthday displayed [ ShowFull | ShowMonthAndDay | Hide ]
defaultCulture string(5) The default culture to display content as to the user. This must be a value that the server is configured to accept (as per available cultures, ie. 'en', 'fr')
timeZone string The default timezone for the user to display date times. See list of valid timezones
token string Required. A valid token authentication parameter

List of valid timezones:
Afghanistan Standard Time
Alaskan Standard Time
Arab Standard Time
Arabian Standard Time
Arabic Standard Time
Argentina Standard Time
Atlantic Standard Time
AUS Central Standard Time
AUS Eastern Standard Time
Azerbaijan Standard Time
Azores Standard Time
Bangladesh Standard Time
Canada Central Standard Time
Cape Verde Standard Time
Caucasus Standard Time
Cen. Australia Standard Time
Central America Standard Time
Central Asia Standard Time
Central Brazilian Standard Time
Central Europe Standard Time
Central European Standard Time
Central Pacific Standard Time
Central Standard Time
Central Standard Time (Mexico)
China Standard Time
Dateline Standard Time
E. Africa Standard Time
E. Australia Standard Time
E. Europe Standard Time
E. South America Standard Time
Eastern Standard Time
Egypt Standard Time
Ekaterinburg Standard Time
Fiji Standard Time
FLE Standard Time
Georgian Standard Time
GMT Standard Time
Greenland Standard Time
Greenwich Standard Time
GTB Standard Time
Hawaiian Standard Time
India Standard Time
Iran Standard Time
Israel Standard Time
Jordan Standard Time
Kamchatka Standard Time
Korea Standard Time
Magadan Standard Time
Mauritius Standard Time
Mid-Atlantic Standard Time
Middle East Standard Time
Montevideo Standard Time
Morocco Standard Time
Mountain Standard Time
Mountain Standard Time (Mexico)
Myanmar Standard Time
N. Central Asia Standard Time
Namibia Standard Time
Nepal Standard Time
New Zealand Standard Time
Newfoundland Standard Time
North Asia East Standard Time
North Asia Standard Time
Pacific SA Standard Time
Pacific Standard Time
Pacific Standard Time (Mexico)
Pakistan Standard Time
Paraguay Standard Time
Romance Standard Time
Russian Standard Time
SA Eastern Standard Time
SA Pacific Standard Time
SA Western Standard Time
Samoa Standard Time
SE Asia Standard Time
Singapore Standard Time
South Africa Standard Time
Sri Lanka Standard Time
Syria Standard Time
Taipei Standard Time
Tasmania Standard Time
Tokyo Standard Time
Tonga Standard Time
Ulaanbaatar Standard Time
US Eastern Standard Time
US Mountain Standard Time
UTC
UTC+12
UTC-02
UTC-11
Venezuela Standard Time
Vladivostok Standard Time
W. Australia Standard Time
W. Central Africa Standard Time
W. Europe Standard Time
West Asia Standard Time
West Pacific Standard Time
Yakutsk Standard Time

Response Status Codes:
200 - Update successful
400 - For any parameter validation errors
401 - Token parameter is invalid
403 - No permissions to make update
404 - Cant find user to update

Example request
PATCH http://yourserver.com/api/users/{userId}
  Content-Type: application/json
{
    "firstName": "Test",
    "lastName": "Person",
    "email": "test.person@test.com",
    "salutation": "Mr",
    "preferredName": "Updated preferred name",
    "profileText": "Profile text",
    "jobTitle": "Chief Tester",
    "phoneTel": "666-666-6666",
    "phoneFax": "777-777-7777",
    "phoneMobile": "888-888-8888",
    "timeZone": "Pacific Standard Time",
    "defaultCulture": "fr",
    "birthday": "1999/01/23",
    "birthdayDisplay": "ShowMonthAndDay"
}
{
    userId: 2250,
    contentId: 10653,
    firstName: 'Test',
    lastName: 'Person',
    preferredName: 'Updated preferred name',
    salutation: 'Mr',
    email: 'test.person+32G2lWA4st@test.com',
    username: 'testperson-PHHOaxkkNO',
    jobTitle: 'Chief Tester',
    timeZone: 'Pacific Standard Time',
    defaultCulture: 'fr',
    birthday: 'Jan 23',
    phoneNumbers: {
        fax: '777-777-7777',
        mobile: '888-888-8888',
        tel: '666-666-6666'
    },
    images: {
        small: '/themeimage/288000000000/347/50x50/False/profile-default.png',
        medium: '/themeimage/288000000000/347/250x250/False/profile-default.png',
        large: '/themeimage/288000000000/347/0x0/False/profile-default.png'
    }
}