Social - Person - Update
/social/person/update/{wpuser}/{wpauth}
Updates a user based on parameters passed in.
Update works very similar to social/person/register but you are required to pass in an existing users email address or WPUserID (both in the user object).
A GET method exists as /social/person/update/user/auth but is deprecated, please use this POST version.
A simple web-based utility is available for managing users.
NOTE: If an API key is added via this update call, it is not applied until a manual login occurs.
Authentication
Required, see Auth - Login, must come from ikanow.com website on Saas, or must be admin on deployed version
Arguments
POST.setup (required)
JSON object of a user and authentication following below format
Example
Fields that can be changed include: user.email, user.firstname, user.lastname, user.phone, user.SubscriptionEndDate, user.SubscriptionID, user.SubscriptionStartDate, user.SubscriptionTypeID, auth.password, auth.accountType
These objects are explained in more detail on this page: User creation and updating JSON object formats
SetupJSON = { "user": { "firstname":"jill","lastname":"smith","phone":"5555555555","email":["jillsmith@ikanow.com"] }, "auth": { "username":"jillsmith@ikanow.com","password":"SHA256_HASHED_PASSWORD","accountType":"user" } }
Method.Post
curl \-XPOST 'http://infinite.ikanow.com/api/social/person/update' \-d '{ "user": {"firstname":"jill","lastname":"smith","phone":"5555555555","email":["jillsmith@ikanow.com"] },"auth": {"username":"jillsmith@ikanow.com","password":"SHA256_HASHED_PASSWORD","accountType":"user"} }'
Example Response
{ response: { action: "WP Update User" success: true message: "User Updated Successfully" time: 10 } }
Common Error Messages:
- Need to specify WPUserID (or email address): the user object is required to have the WPUserID field or the email field populated.
- Can't find user specified by WPUserID: the WPUserID submitted was not linked to a person in the system
- The primary email address is not unique: the first email submitted in the user object email field has already been used for another user
error while updating wp objects: a general error for other issue occured