(Quick Reference) Service: Update

Description: This web service is used in order to update an existing item group object to the database

URL:

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

URL with external_id:

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

Method: PUT

Request content type: application/json

Parameters:

NameDescriptionTypeRequiredExample values
referencethe new reference of the item groupStringYes 
namethe new name of the item groupStringYes 
descriptionsome details of the new groupStringNo 
reference must be unique

Success Output

Success case: response.status=201
{
    "id": 23,
    "reference": "RG-3",
    "name": "new ItemGroup3",
    "description": null,
    "organization": "Lyon",
    "dateCreated": "2016-08-18T10:53:58Z",
    "lastUpdated": "2016-08-18T10:59:44Z"
}

Failure Output

Failure case:response.status = 400
{
    "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 item group with the id 4 doesn't exist."
}

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