Appearance
updateUserProfile ​
Allows an INTERACT end user to update their own user profile information. Should work across NI and MI. Backend tries to figure out what has actiually changed and only update that otherwiser we run the risk of clients not filling in existing filled fields and submitting thereby leading to possible data loss. In general, it is expected a client 1.) Call findUserProfile() to retrieve current profile details 2.) Allow user to add/edit/remove data 3.) Send the modified user data back via this call updateUserProfile()
Request ​
http
PUT /rest/user/profileHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
| Parameter | Type | Required | Description |
|---|---|---|---|
uId | integer | Yes | User id of the User updating their profile. |
fieldsToNull | string[] | No | List of field names that you wish to force to null value in backend. |
json
{
"uTitleId": 1,
"uTitle": "Associate Professor",
"uGenderCode": "M",
"uGenderName": "Male",
"uEmail": "aaron.mcmullen@hypermedia.com.au",
"uFirstName": "UPDATED FIRST NAME",
"uLastName": "UPDATED LAST NAME",
"uCountryCode": "AU",
"uCountryName": "AUSTRALIA",
"uPrimaryMobile": "123",
"uDateOfBirth": "2018-04-30",
"uInterests": "interests",
"uDietaryRequirements": "dietary requirements",
"uPhoto": null,
"uEnableLocation": false,
"uEnableNotifications": false,
"uAllowAllEmails": true,
"uAllowNewsletterEmail": true,
"uProfessionId": 1,
"uProfessionName": "Doctor",
"uSpecialtyId": 1,
"uSpecialtyName": "Addiction Medicine",
"uOtherTitle": null,
"uOtherProfession": null,
"uOtherSpecialty": null,
"uFacebookId": "facebook id",
"uTwitterId": "twitter id",
"uLinkedinId": "linkedin id",
"uLinkedinUrl": "linkedin url",
"uTimezoneId": "Australia/Sydney",
"uCreationDate": "2018-04-25",
"uInteractTsAndCs": "Y",
"uSAMTrackingConsent": "Y",
"uiCloudConsent": "Y",
"uGoogleConsent": "N",
"uFacebookConsent": "N",
"uConditionId": 1,
"uConditionName": "Systemic Lupus Erythematosus (SLE)",
""uTreatmentNotes": "Have stopped looking at the moon",
"uId": 8,
"fieldsToNull": ["uCountryCode", "uProfessionId", "uDietaryRequirements" ]
}Response ​
200 OK ​
HTTP 200 means it succeeded but if you must have a message then see below
JSON response:
json
{
"updatedFieldCount": 24
}Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSMaxFileUploadSizeException | See Error Definitions |
WSEmailServiceException | See Error Definitions |
WSInternalException | See Error Definitions |
WSFieldLengthException | See Error Definitions |