POST Api/Applicant/{applicantId}/CustomField

Creates or updates the value of a custom field of a specific applicant.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
applicantId

The ID of the applicant.

integer

Required

Body Parameters

The custom field to update, and the new value.

CustomFieldValueParameter
NameDescriptionTypeAdditional information
CustomField

The identifier (as text) of the associated custom field. Is also known as "internal name" in the eRecruiter.

string

None.

Value

Stores the formatted version of either bool, string, date or number value. Depending on the CustomFieldType of the CustomField a different format of the value has to be provided. * TextMultiLine, TextSingleLine: the text as string. * CheckBox: "true" or "false" as string * DropdownList: the selected value as string * Date: A string representation of the datetime as short date pattern (format specifier "d"). * Html: Not supported

string

None.

Values

A collection of string values if the custom field type is of type CustomFieldType.CheckboxList.

Collection of string

None.

Request Formats

application/json, text/json

Sample:
{
  "CustomField": "sample string 1",
  "Value": "sample string 2",
  "Values": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<CustomFieldValueParameter xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/eRecruiter.Api.Parameters">
  <CustomField>sample string 1</CustomField>
  <Value>sample string 2</Value>
  <Values xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Values>
</CustomFieldValueParameter>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The updated custom field value. Returns HTTP 404 if the specified applicant ID does not exist. Returns HTTP 403 if access the the specified applicant is denied. Returns HTTP 400 if the specified custom field does not exist.

CustomFieldValueResponse
NameDescriptionTypeAdditional information
CustomField

The associated custom field where the value belongs to.

CustomFieldResponse

None.

Value

The Value property provides a formatted version of the one property which holds a value (Either BoolValue property, StringValue property, DateValue property or NumberValue).

string

None.

BoolValue

Contains a boolean value true or false if type is CustomFieldType.CheckBox.

boolean

None.

DateValue

Contains a datetime value if type is CustomFieldType.Date.

date

None.

StringValue

Contains a string if type is either CustomFieldType.TextMultiLine, CustomFieldType.TextSingleLine, CustomFieldType.DropdownList or CustomFieldType.Html. If type is CustomFieldType.CheckboxList the property contains all values separated by the "|" character.

string

None.

NumberValue

Contains a number value if a value of any type (usually CustomFieldType.DropdownList) can be parsed to a number.

decimal number

None.

Response Formats

application/json, text/json

Sample:
{
  "CustomField": {
    "Name": "sample string 1",
    "Title": "sample string 2",
    "GroupName": "sample string 3",
    "Type": 0,
    "Target": 0,
    "IsPublic": true,
    "PossibleValues": [
      "sample string 1",
      "sample string 2"
    ],
    "DefaultValue": "sample string 5"
  },
  "Value": "sample string 1",
  "BoolValue": true,
  "DateValue": "2024-09-03T12:31:14.8289941+02:00",
  "StringValue": "sample string 2",
  "NumberValue": 1.0
}

application/xml, text/xml

Sample:
<CustomFieldValueResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/eRecruiter.Api.Responses">
  <BoolValue>true</BoolValue>
  <CustomField>
    <DefaultValue>sample string 5</DefaultValue>
    <GroupName>sample string 3</GroupName>
    <IsPublic>true</IsPublic>
    <Name>sample string 1</Name>
    <PossibleValues xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </PossibleValues>
    <Target>Applicant</Target>
    <Title>sample string 2</Title>
    <Type>TextMultiLine</Type>
  </CustomField>
  <DateValue>2024-09-03T12:31:14.8289941+02:00</DateValue>
  <NumberValue>1</NumberValue>
  <StringValue>sample string 2</StringValue>
  <Value>sample string 1</Value>
</CustomFieldValueResponse>