Progress with Redwood: Redwood Resources for Oracle Cloud HCM - Go Here
Create an employee using rest api
Dear All,
I am attempting to create an employee using the following REST API: /hcmRestApi/resources/11.13.18.05/workers.
Here is the request body:
{
"DateOfBirth": "2023-11-20",
"names": [
{
"LastName": "test",
"FirstName": "test",
"MiddleNames": null,
"LegislationCode":"SA"
}
],
"addresses": [
{
"AddressType": "HOME",
"AddressLine1": "test",
"AddressLine2": null,
"AddressLine3": null,
"AddressLine4": null,
"TownOrCity": "test",
"Region1": null,
"Region2": null,
"Region3": null,
"Country": "SA",
"PostalCode": null
}
],
"emails": [
{
"EmailType": "W1",
"EmailAddress": "test@example.com"
}
],
"workRelationships": [
{
"LegalEmployerName": "test",
"WorkerType": "E",
"StartDate":"2023-12-09",
"assignments": [
{
"BusinessUnitName": "KSA BU1",
"ActionCode": "HIRE",
"JobCode": "01",
"LocationCode": "MST_location_KSA BU1",
"DepartmentName": "Administration",
"managers": [
{
"ManagerAssignmentNumber": "E100022-2",
"ManagerType": "LINE_MANAGER"
}
]
}
]
}
]
}
However, each time I try to set the start date ( "StartDate") attribute differently that the sysdate in the workrelationship object , I encounter the following error: