Use the following operation to create (POST) or update (PUT) a custom field for the company or for a specific employee (see https://api.folkshr.app/api/documentation#/Custom%20Fields).
POST /api/v2/employees/{employee}/custom-fields
PUT /api/v2/employees/{employee}/custom-fields/{custom-fields-id}
When creating or editing a custom field, you can define a value as follows.
To define a value for a company custom field:
{
"employee_id": "null"
}
To define a value for a custom employee field:
When a value is sent for an employee, if a value already exists, the existing value is overwritten.
{
"employee_id": "target_employee"
}
The custom field value must respect the custom field type schema. When the value “null” is sent, the value associated with the custom field and the employee is removed.
- For an Alpha numeric custom field, a string must be supplied.
- For a Date custom field, a date in “YYYY-MM-DD” format must be supplied.
- For a Drop-down list custom field, the identifier of an option must be supplied.