(Quick Reference) Service: Assign item group to employee

Description: This web service is used to assign an item group to an employee, the data created will be returned in JSON format



Method: POST

Request content type: application/json


NameDescriptionTypeRequiredExample values
userIdthe id of the employeeLong/StringYes777
itemCategoryIdthe id of the item category to assignLong/StringYes 
useExternalIdBy default, it is set to false. set it to true if you want to use external ids.Booleannotrue , false
The customer can only be assigned just one time

Success Output

Success case: response.status=201
    "id": 570,
    "employeeReference": "Emp-3",
    "itemCategoryReference": "R-A-001",
    "itemCategory": {
      "id": 1751,
      "reference": "R-A-001",
      "name": "category1",
      "href": "/api/v1.0/itemCategories/1751"
    "employee": {
      "id": 23,
      "reference": "Emp-3",
      "name": "new Employee",
      "href": "/api/v1.0/employees/23"
    "organization": "Lyon",
    "dateCreated": "2016-08-22T09:42:19Z",
    "lastUpdated": "2016-08-22T09:42:19Z"

Failure Output

Failure case:response.status = 400
    "error": "missing_param",
    "error_description": "userId parameter is missing"
"error": "already_assigned",
    "error_description": "item group is already assigned to employee."
     "error": "save_failed",
     "error_description": "Failed to save instance"

Failure case:response.status = 404
    "error_description": "The user with the id 999 doesn't exist."

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