Retrieve Worker Details

To retrieve worker details:

  1. Perform a GET operation on the workers API using query parameters.
  2. Verify the details returned in the response.

Example URL

Use this resource URL format.

GET

/hcmRestApi/resources/11.13.18.05/workers?q=workRelationships.assignments.AssignmentNumber = 'E955160008191551'&expand=workRelationships.assignments.managers,emails,phones,nationalIdentifiers,addresses,names

Example Header

Provide the header.

REST-Framework-Version : 4

Example Response

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

{
    "items": [
        {
            "PersonId": 300100180313789,
            "PersonNumber": "955160008191551",
            "CorrespondenceLanguage": null,
            "BloodType": null,
            "DateOfBirth": "1980-01-01",
            "DateOfDeath": null,
            "CountryOfBirth": null,
            "RegionOfBirth": null,
            "TownOfBirth": null,
            "ApplicantNumber": null,
            "CreatedBy": "hcm.user@oracle.com",
            "CreationDate": "2019-05-23T05:40:05+00:00",
            "LastUpdatedBy": "hcm.user@oracle.com",
            "LastUpdateDate": "2019-05-23T05:41:47.166+00:00",
            "emails": {
                "items": [],
                "count": 0,
                "hasMore": false,
                "limit": 25,
                "offset": 0,
                "links": [
                    ...]
            },
            "phones": {
                "items": [],
                "count": 0,
                "hasMore": false,
                "limit": 25,
                "offset": 0,
                "links": [
                    ...]
            },
            "workRelationships": {
                "items": [
                    {
                        "PeriodOfServiceId": 300100180313798,
                        "LegislationCode": "BT",
                        "LegalEntityId": 300100074901955,
                        "LegalEmployerName": "Bhutan_LE_PSU",
                        "WorkerType": "E",
                        "PrimaryFlag": true,
                        "StartDate": "2015-01-01",
                        "LegalEmployerSeniorityDate": null,
                        "EnterpriseSeniorityDate": null,
                        "OnMilitaryServiceFlag": false,
                        "WorkerNumber": "71034",
                        "ReadyToConvertFlag": null,
                        "TerminationDate": null,
                        "NotificationDate": null,
                        "LastWorkingDate": null,
                        "RevokeUserAccess": null,
                        "RecommendedForRehire": "ORA_NS",
                        "RecommendationReason": null,
                        "RecommendationAuthorizedByPersonId": null,
                        "CreatedBy": "hcm.user@oracle.com",
                        "CreationDate": "2019-05-23T05:40:57.511+00:00",
                        "LastUpdatedBy": "hcm.user@oracle.com",
                        "LastUpdateDate": "2019-05-23T05:41:47.671+00:00",
                        "assignments": {
                            "items": [
                                {
                                    "AssignmentId": 300100180313804,
                                    "AssignmentNumber": "E955160008191551",
                                    "AssignmentName": "E955160008191551",
                                    "ActionCode": "HIRE",
                                    "ReasonCode": null,
                                    "EffectiveStartDate": "2015-01-01",
                                    "EffectiveEndDate": "4712-12-31",
                                    "EffectiveSequence": 1,
                                    "EffectiveLatestChange": "Y",
                                    "BusinessUnitId": 300100008717239,
                                    "BusinessUnitName": "ZHRX_IN_Business_Unit",
                                    "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": null,
                                    "PositionCode": null,
                                    "SynchronizeFromPositionFlag": false,
                                    "JobId": null,
                                    "JobCode": null,
                                    "GradeId": null,
                                    "GradeCode": null,
                                    "GradeLadderId": null,
                                    "GradeLadderName": null,
                                    "GradeStepEligibilityFlag": true,
                                    "GradeCeilingStepId": null,
                                    "GradeCeilingStep": null,
                                    "DepartmentId": null,
                                    "DepartmentName": null,
                                    "ReportingEstablishmentId": null,
                                    "ReportingEstablishmentName": null,
                                    "LocationId": null,
                                    "LocationCode": null,
                                    "WorkAtHomeFlag": false,
                                    "AssignmentCategory": null,
                                    "WorkerCategory": null,
                                    "PermanentTemporary": null,
                                    "FullPartTime": null,
                                    "ManagerFlag": false,
                                    "HourlySalariedCode": null,
                                    "NormalHours": 40,
                                    "Frequency": "W",
                                    "StartTime": "08:00",
                                    "EndTime": "17:00",
                                    "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,
                                    "ContractId": null,
                                    "ContractNumber": null,
                                    "InternalBuilding": null,
                                    "InternalFloor": null,
                                    "InternalOfficeNumber": null,
                                    "InternalMailstop": null,
                                    "DefaultExpenseAccount": null,
                                    "PeopleGroup": null,
                                    "CreatedBy": "hcm.user@oracle.com",
                                    "CreationDate": "2019-05-23T05:40:57.676+00:00",
                                    "LastUpdatedBy": "hcm.user@oracle.com",
                                    "LastUpdateDate": "2019-05-23T05:41:47.735+00:00",
                                    "managers": {
                                        "items": [],
                                        "count": 0,
                                        "hasMore": false,
                                        "limit": 25,
                                        "offset": 0,
                                        "links": [
                                                  ...]
            },
            "names": {
                "items": [
                    {
                        "PersonNameId": 300100180313790,
                        "EffectiveStartDate": "2015-01-01",
                        "EffectiveEndDate": "4712-12-31",
                        "LegislationCode": "BT",
                        "LastName": "Test_AM_20_05_19_02",
                        "FirstName": "Emp2",
                        "Title": null,
                        "PreNameAdjunct": null,
                        "MiddleNames": null,
                        "DisplayName": "Emp2 Test_AM_20_05_19_02",
                        "OrderName": "Test_AM_20_05_19_02 Emp2",
                        "ListName": "Test_AM_20_05_19_02, Emp2",
                        "FullName": "Test_AM_20_05_19_02, Emp2",
                        "NameLanguage": "US",
                        "CreatedBy": "hcm.user@oracle.com",
                        "CreationDate": "2019-05-23T05:40:05.013+00:00",
                        "LastUpdatedBy": "hcm.user@oracle.com",
                        "LastUpdateDate": "2019-05-23T05:41:47.171+00:00",
                        "LocalPersonNameId": 300100180313791,
                        "LocalEffectiveStartDate": "2015-01-01",
                        "LocalEffectiveEndDate": "4712-12-31",
                        "LocalLegislationCode": "BT",
                        "LocalLastName": "Test_AM_20_05_19_02",
                        "LocalFirstName": "Emp2",
                        "LocalTitle": null,
                        "LocalPreNameAdjunct": null,
                        "LocalMiddleNames": null,
                        "LocalDisplayName": "Emp2 Test_AM_20_05_19_02",
                        "LocalOrderName": "Test_AM_20_05_19_02 Emp2",
                        "LocalListName": "Test_AM_20_05_19_02, Emp2",
                        "LocalFullName": "Test_AM_20_05_19_02 Emp2",
                        "LocalNameLanguage": "US",
                        "LocalCreatedBy": "hcm.user@oracle.com",
                        "LocalCreationDate": "2019-05-23T05:40:05.019+00:00",
                        "LocalLastUpdatedBy": "hcm.user@oracle.com",
                        "LocalLastUpdateDate": "2019-05-23T05:41:47.171+00:00",
                        "links": [
                                 ...]
            },
            "nationalIdentifiers": {
                "items": [],
                "count": 0,
                "hasMore": false,
                "limit": 25,
                "offset": 0,
                "links": [
                           ...]
            },
            "addresses": {
                "items": [
                    {
                        "AddressId": 300100180313796,
                        "EffectiveStartDate": "2015-01-01",
                        "EffectiveEndDate": "4712-12-31",
                        "AddressLine1": "1",
                        "AddressLine2": null,
                        "AddressLine3": null,
                        "AddressLine4": null,
                        "TownOrCity": "1",
                        "Region1": null,
                        "Region2": null,
                        "Region3": null,
                        "Country": "BT",
                        "PostalCode": null,
                        "LongPostalCode": null,
                        "AddlAddressAttribute1": null,
                        "AddlAddressAttribute2": null,
                        "AddlAddressAttribute3": null,
                        "AddlAddressAttribute4": null,
                        "AddlAddressAttribute5": null,
                        "CreatedBy": "hcm.user@oracle.com",
                        "CreationDate": "2019-05-23T05:40:47.615+00:00",
                        "LastUpdatedBy": "hcm.user@oracle.com",
                        "LastUpdateDate": "2019-05-23T05:41:47.431+00:00",
                        "PersonAddrUsageId": 300100180313795,
                        "AddressType": "HOME",
                        "PrimaryFlag": true,
                        "links": [
                               ...]
            }
    ]
}