(Quick Reference) Service: Update a user

Description: This web service is used to update a user object

URL:

https://BASE_URL/api/VERSION/users/{id}

URL with external_id:

https://BASE_URL/api/VERSION/users/reference/{id}

Method: PUT

Request content type: application/json

Parameters:

NameDescriptionTypeRequiredExample values
email Stringno 
password Stringno 
enabled booleanno 

Success Output

{

Success case: response.status=201
{
    "id": 3,
    "email": "foobar@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "reference": "Ref-01",
    "employee": {
      "id": 3,
      "href": "/api/v2.0/employees/3"
    },
    "enabled": true,
    "organization": "entity1",
    "dateCreated": "2017-01-18T17:18:36Z",
    "lastUpdated": "2017-02-16T17:59:09Z"
}

Failure Output

Failure case:response.status = 400
{
  "error": "not_unique",
  "error_description": "email already used."
}
{
     "error": "save_failed",
     "error_description": "Failed to save instance"
}

Failure case:response.status = 404

{
  "error": "not_found",
  "error_description": "The user with the id 541 doesn't exist."
}

Failure case:response.status = 500
{
     "error": "server_error",
     "error_description": "Oops! Something went wrong..."
}