Update an employee field (hr:admin); key and kind cannot change
PUT /api/hr/v1/fields/{id}
Module: HR · operationId: updateField · Tag: Configuration · Auth: access token (Authorization: Bearer <accessToken>)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) | yes |
Request body
application/json (required)
key(string, required): Stable key; the key in customFieldskind(string, required): Kind of value;phonetakes digits, spaces and+ ( ) / . -(at least 3 digits,+only first, at most 40 characters),emailthe shapelocal@domain.tld(one oftext,longtext,number,date,datetime,bool,select,multiselect,url,phone,email)label(string, required): Display namearchived(boolean): Archived: no longer offered for new data, kept for existing datadescription(string): Help text of the fieldid(string): Id of the fieldoptions(array of object): Choices of select and multiselect fieldscolor(string): Colour of the choicelabel(string): Display text of the choicevalue(string): Stored value of the choice
required(boolean): A value is requiredrestricted(boolean): Values are visible only to callers with hr:writesection(string): Group in forms; defaults to other (one ofperson,contact,employment,working_time,confidential,other)sortOrder(integer): Position within the sectionstandard(boolean, read-only): From the built-in catalogue; switched on and off with archived, key and kind are fixedversion(integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)visibleToColleagues(boolean): Values are shown to every colleague in the directory (listColleagues); not together with restricted (400)
Example:
{
"archived": false,
"description": "Herstellerzertifikate, z. B. MS-102 oder CCNA",
"id": "2c4e6a8c-0e2a-4c4e-8a6c-0e2a4c6e8a10",
"key": "zertifizierungen",
"kind": "multiselect",
"label": "Zertifizierungen",
"options": [
{
"color": "info",
"label": "MS-102",
"value": "ms_102"
},
{
"color": "info",
"label": "MD-102",
"value": "md_102"
},
{
"color": "success",
"label": "CCNA",
"value": "ccna"
}
],
"required": false,
"restricted": false,
"section": "employment",
"sortOrder": 70,
"standard": false,
"version": 1,
"visibleToColleagues": true
}
Responses
- 200 Saved (
application/json) - 400 Error (
application/json) - 409 Error (
application/json)
Fields of the 200 answer:
key(string, required): Stable key; the key in customFieldskind(string, required): Kind of value;phonetakes digits, spaces and+ ( ) / . -(at least 3 digits,+only first, at most 40 characters),emailthe shapelocal@domain.tld(one oftext,longtext,number,date,datetime,bool,select,multiselect,url,phone,email)label(string, required): Display namearchived(boolean): Archived: no longer offered for new data, kept for existing datadescription(string): Help text of the fieldid(string): Id of the fieldoptions(array of object): Choices of select and multiselect fieldscolor(string): Colour of the choicelabel(string): Display text of the choicevalue(string): Stored value of the choice
required(boolean): A value is requiredrestricted(boolean): Values are visible only to callers with hr:writesection(string): Group in forms; defaults to other (one ofperson,contact,employment,working_time,confidential,other)sortOrder(integer): Position within the sectionstandard(boolean, read-only): From the built-in catalogue; switched on and off with archived, key and kind are fixedversion(integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)visibleToColleagues(boolean): Values are shown to every colleague in the directory (listColleagues); not together with restricted (400)
Example 200 answer:
{
"archived": false,
"description": "Herstellerzertifikate, z. B. MS-102 oder CCNA",
"id": "2c4e6a8c-0e2a-4c4e-8a6c-0e2a4c6e8a10",
"key": "zertifizierungen",
"kind": "multiselect",
"label": "Zertifizierungen",
"options": [
{
"color": "info",
"label": "MS-102",
"value": "ms_102"
},
{
"color": "info",
"label": "MD-102",
"value": "md_102"
},
{
"color": "success",
"label": "CCNA",
"value": "ccna"
}
],
"required": false,
"restricted": false,
"section": "employment",
"sortOrder": 70,
"standard": false,
"version": 1,
"visibleToColleagues": true
}
Example request
curl -X PUT 'https://api.mbcom.cloud/api/hr/v1/fields/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"archived":false,"description":"Herstellerzertifikate, z. B. MS-102 oder CCNA","id":"2c4e6a8c-0e2a-4c4e-8a6c-0e2a4c6e8a10","key":"zertifizierungen","kind":"multiselect","label":"Zertifizierungen","options":[{"color":"info","label":"MS-102","value":"ms_102"},{"color":"info","label":"MD-102","value":"md_102"},{"color":"success","label":"CCNA","value":"ccna"}],"required":false,"restricted":false,"section":"employment","sortOrder":70,"standard":false,"version":1,"visibleToColleagues":true}'