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
Parameter | Is parameter supported? | Notes |
---|---|---|
firstName | Supported | |
lastName | Supported | |
employment.positionId | Supported | Taken from the Get Positions API |
employment.designation | Supported | Taken from the Get Positions API |
employment.workShiftId | Not Supported | Is inferred from the position |
workEmail | Supported | |
personalEmails | Supported | |
workAddress | Not Supported | Is inferred from the position |
Additionally, the API requires the following mandatory parameters to be passed in the metadata
field:
Parameter | Notes | Example |
---|---|---|
payScaleArea | Refers 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, USA | USA/US2 |
payScaleType | Refers 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 Salaried | USA/US2 |
nationality | USA | |
gender | MALE |
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
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"
}
'
Updated 11 months ago