Create an Employee in SAP SuccessFactors API

To create an Employee in SAP SuccessFactors, we'll use the Create an Empployee API.

API Paramaters

The following table gives an overview of the parameters of the API

ParameterIs parameter supported?Notes
firstNameSupported
lastNameSupported
employment.positionIdSupportedTaken from the Get Positions API
employment.designationSupportedTaken from the Get Positions API
employment.workShiftIdNot SupportedIs inferred from the position
workEmailSupported
personalEmailsSupported
workAddressNot SupportedIs inferred from the position

Additionally, the API requires the following mandatory parameters to be passed in the metadatafield:

ParameterNotesExample
payScaleAreaRefers to the Pay Scale Area to which the employee belongs, and is a mandatory parameter., Refer to the cURLs below to know about how to get the list of Pay Scale Areas. Eg, An employee belonging to the USA Pay Scale region will have it the area as Eastern Region, USAUSA/US2
payScaleTypeRefers to the Pay Scale Type to which the employee belongs, and is a mandatory parameter., Refer tothe cURLs below to know about how to get the list of Pay Scale Types. Eg, A full time employee might have the pay type as SalariedUSA/US2
nationalityUSA
genderMALE

A cURL request to create an employee could look like:

curl --request POST \
     --url https://api.getknit.dev/v1.0/hr.employee.create \
     --header 'Authorization: Bearer <YOUR_API_KEY>' \
     --header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "employment": {
    "positionId": "50008492",
    "designation": "Recruiter"
  },
  "firstName": "New",
  "lastName": "Employee",
  "workEmail": "[email protected]",
  "personalEmails": [
    "[email protected]"
  ],
   "metadata": {
    "payScaleArea": "USA/US2",
    "payScaleType": "USA/US2",
    "nationality": "USA",
    "gender": "MALE"
  }
}
'

Get list of PayScaleArea and PayScaleType

A cURL request to get the list of PayScaleArea could look like:

curl --request POST \
     --url https://api.getknit.dev/v1.0/passthrough \
     --header 'Authorization: Bearer <YOUR_API_KEY>' \
     --header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "method": "GET",
  "path": "PayScaleArea?$format=json"
}
'

A cURL request to get the list of PayScaleType could look like:

curl --request POST \
     --url https://api.getknit.dev/v1.0/passthrough \
     --header 'Authorization: Bearer <YOUR_API_KEY>' \
     --header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "method": "GET",
  "path": "PayScaleType?$format=json"
}
'