(Quick Reference) Service: Update a group of employees

Description: This web service is used in order to updates an existing group of employees object into the database

URL:

https://BASE_URL/aapi/VERSION/employeeGroups/{id}

URL with external_id:

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

Method: PUT

Request content type: application/json

Parameters:

NameDescriptionTypeRequiredexample values
idid of the desired employee group to updateLong/StringYes777
referencethe new reference valueStringYes 
namethe new name valueStringYes 
descriptionthe new description valueStringNo 
reference must be unique

Success Output

Success case: response.status=200
{
    "id": 6,
    "name": "toto",
    "reference": "100",
    "organization": "Lyon",
    "description": "this is toto",
    "dateCreated": "2016-08-17T14:59:43Z",
    "lastUpdated": "2016-08-17T15:20:59Z"
}

Failure Output

Failure case:response.status = 400
{
    "error": "invalid_param_type",
    "error_description": "The type of parameter id you provided is not valid for this request."
}
{
    "error": "missing_param",
    "error_description": "reference parameter is missing"
}
{
    "error": "not_unique",
    "error_description": "reference already used"
}
{
     "error": "save_failed",
     "error_description": "Failed to save instance"
}

Failure case:response.status = 404
{
    "error": "not_found",
    "error_description": "The employee group with the id 11111 doesn't exist."
}

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