You can update a user's profile by sending the POST request with the XML data to the following URL: /user/<user_id>.
Permission to run the request: Account Owner, Administrator, Organization Administrator.
Parameter | Description |
---|---|
X-Auth-Account-Url(required) | Base URL of the account, e.g. http://myaccount.ispringlearn.com |
X-Auth-Email (required) | Administrator/Publisher e-mail address. |
X-Auth-Password(required) | Administrator/Publisher password. |
X-Fields-Xml (required) | An XML that contains the values of the user profile fields. For extended reference go to Getting User Profile Fields. |
X-Organization-Id (optional) | Organization ID to which a user will be moved. |
X-Role (optional) | Assign a role to the new user: user |
X-Groups (optional) | A list of group IDs to which a user will be added. |
After the request has been completed, the system returns the reponse with Code 200. The reponse may include the X-Exceeded-Groups header, which contains a comma-separated list of group IDs, to which a user cannot be added.
Code | Text | Description |
---|---|---|
404 | Unknown user | Userwith the specified ID was not found. |
403 | Permission denied | You have no permissions to update info of the specified user. |
400 | Bad Request | The system failed to process therequest,because it did not contain all necessary parameters. |
400 | Invalid value <field_value>. Field <field_name> must be unique. | Error appears if the 'user_fields' login and email have been changed. They should be unique. |
200 | Ok | User's profile has been updated. |
POST /user/4 HTTP/1.1 Host: api.ispringonline.com X-Auth-Account-Url: http://myaccount.ispringlearn.com X-Auth-Email: email@email.com X-Auth-Password: 1234 X-Fields-Xml: <fields><first_name>John</first_name><email>john@gmail.com</email> <last_name>Smith</last_name><phone>123-31-23</phone><state>Texas</state> <country_id>1</country_id><password>1234</password></fields> X-Role: administrator X-Groups: 4 X-Organization-Id: 1 |
HTTP/1.1 200 OK Content-Length: 0 |