Field Must Not Change
Change isn't always good
Summary
There are some situations where a property on an entity is listed in the reference as being updatable but under certain circumstances is not allowed to be changed. One example of this is EmployeeNumber on the Employee entity, where this property can usually be freely updated but if the system is configured to auto-generate employee numbers, then the system will reject any requested changes to the property.
curl -X PUT -H "Authorization: ApiKey {ApiKey}" \ -H "Content-Type: application/json" \ --data "{\"EmployeeNumber\": \"Test\"}" \ https://api.youmanage.co.uk/employees/5 { "error": { "code": "YM1000", "reference": "https://developer.youmanage.co.uk/api/errors/ym1000", "target": "Validation", "message": "Validation failed", "details": [ { "code": "YM1002", "reference": "https://developer.youmanage.co.uk/api/errors/ym1002", "target": "EmployeeNumber", "message": "Validation failed for a specific property", "details": [ { "code": "YM1010", "reference": "https://developer.youmanage.co.uk/api/errors/ym1010", "target": "EmployeeNumber", "message": "Value can not be changed", "details": null } ] }, ] } }
Solution
You can either reissue the request but without the changing the data of that property, or you can get in touch with your system administrator to disable the automatic generation of that property.