Transfer a Worker

Let's say that Alicia Martin needs to be transferred to James Davis' old role which is in a different location. Alicia needs to be transferred to the new location.

To transfer a worker:

  1. Retrieve (GET) the assignment details and obtain the assignment item link.
  2. Perform a PATCH operation on this URL by providing the action code and pertinent assignment details in the request body.

Example URL

Use this resource URL format.

PATCH

/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/child/assignments/{assignmentsUniqID}

Example Request

Here's an example of the request body in JSON format.

Provide the headers.

Content-Type : application/vnd.oracle.adf.resourceitem+json
REST-Framework-Version : 4
effective-Of : RangeMode=UPDATE;RangeStartDate=2019-09-11;RangeEndDate=4712-12-31
{
"ActionCode": "TRANSFER",
"ReasonCode": "LOCCHANGE",
"LocationId":"300100073991592"
}

Example Response

Here's an example of the response body in JSON format.

{
"AssignmentId": 300100180052435,
"AssignmentNumber": "E955160008191552",
"AssignmentName": "REST_AUTO_JobCS",
"ActionCode": "TRANSFER",
"ReasonCode": "LOCCHANGE",
"EffectiveStartDate": "2019-09-11",
"EffectiveEndDate": "4712-12-31",
"EffectiveSequence": 3,
"EffectiveLatestChange": "Y",
"BusinessUnitId": 300100024264603,
"BusinessUnitName": "Vision Central",
"AssignmentType": "E",
"AssignmentStatusTypeId": 100010026278190,
"AssignmentStatusTypeCode": "ACTIVE_PROCESS",
"AssignmentStatusType": "ACTIVE",
"SystemPersonType": "EMP",
"UserPersonTypeId": 13,
"UserPersonType": "Employee",
"ProposedUserPersonTypeId": null,
"ProposedUserPersonType": null,
"ProjectedStartDate": null,
"ProjectedEndDate": null,
"PrimaryFlag": true,
"PrimaryAssignmentFlag": true,
"PositionId": 300100127013307,
"PositionCode": "REST_AUTO_Position_P1_Code",
"SynchronizeFromPositionFlag": true,
"JobId": 300100126526760,
"JobCode": "REST_AUTO_JobCS_Code",
"GradeId": null,
"GradeCode": null,
"GradeLadderId": null,
"GradeLadderName": null,
"GradeStepEligibilityFlag": true,
"GradeCeilingStepId": null,
"GradeCeilingStep": null,
"DepartmentId": 300100126527002,
"DepartmentName": "REST_AUTO_OrganizationCS",
"ReportingEstablishmentId": null,
"ReportingEstablishmentName": null,
"LocationId": 300100126526960,
"LocationCode": "REST_AUTO_LocationCS_Code",
"WorkAtHomeFlag": false,
"AssignmentCategory": null,
"WorkerCategory": null,
"PermanentTemporary": "R",
"FullPartTime": "FULL_TIME",
"ManagerFlag": false,
"HourlySalariedCode": null,
"NormalHours": 45,
"Frequency": "W",
"StartTime": null,
"EndTime": null,
"SeniorityBasis": "ORA_PER_SNDT_DAYS",
"ProbationPeriod": null,
"ProbationPeriodUnit": null,
"ProbationEndDate": null,
"NoticePeriod": null,
"NoticePeriodUOM": null,
"WorkTaxAddressId": null,
"ExpenseCheckSendToAddress": null,
"RetirementAge": null,
"RetirementDate": null,
"LabourUnionMemberFlag": null,
"UnionId": null,
"UnionName": null,
"BargainingUnitCode": null,
"CollectiveAgreementId": null,
"CollectiveAgreementName": null,
"InternalBuilding": null,
"InternalFloor": null,
"InternalOfficeNumber": null,
"InternalMailstop": null,
"DefaultExpenseAccount": null,
"PeopleGroup": null,
"CreatedBy": "HCM_INTEGRATION_SPEC",
"CreationDate": "2019-06-11T14:42:49.967+00:00",
"LastUpdatedBy": "HCM_INTEGRATION_SPEC",
"LastUpdateDate": "2019-06-11T18:30:10.981+00:00",
"links": [...]
}