RESTful Get Org Unit Details

Dayforce RESTful Web Services Developer Guide

Version
R2025.2.1
ft:lastPublication
2025-11-05T18:19:39.327058
RESTful Get Org Unit Details

The consuming application can use the org unit XRefCodes it has retrieved using the Get Org Unit XRefCodes request to retrieve further information about org units using a series of Get Org Unit Detail by XRefCode requests.

The consuming application will need to make one request for each XRefCode. The XRefCode is added to the base URL as shown here:

https://www.dayforcehcm.com/api/CompanyName/V1/OrgUnits/[XRefCode]

The full org unit history isn’t included in the response. Instead, the consuming application can use the ContextDate parameter to request data as of a specified point in time. See the ContextDate parameter description below for more information.

Parameters

Consumers can retrieve org unit details by using combinations of the following common query parameters:

ContextDate (datetime)

  • The ContextDate value is always used as an as-of date in determining which org unit data to return.
  • The service defaults to the current datetime if the requester doesn't specify a value.
  • The datetime value should be expressed as yyyy-mm-ddThh:mm:ss where T is a separator used between the date and time; for example, 2017-01-01T13:24:56.
  • The URL syntax is: https://www.dayforcehcm.com/api/[CompanyName]/V1/OrgUnits/[XRefCode]?ContextDate=20170201T14:59:59

Expand (string)

  • Dayforce recommends optimizing org units details requests so that only the details from the required top-level parent items is included in the results.
  • The following is an example of the URL syntax:
  •                     https://www.dayforcehcm.com/api/[CompanyName]/V1/OrgUnits/[XRefCode]?ContextDate=20170201T14:59:59&expand=OrgUnitLegalEntities,OrgUnitParents
                    

IncludeChildOrgUnits (Boolean)

  • If this parameter is set to true, the request retrieves all immediate child org units of the org unit bring retrieved.
  • Child org units include the same expanded entities as specified using the expand parameter.
  • If this parameter is set to false or not included, then child org units aren't returned.

Response

The response of the RESTful Get Org Unit Detail by XRefCode request is returned in a JSON format, and the following example illustrates:

{
    "Data": {
        "OrgLevel": {
            "XRefCode": "Site",
            "ShortName": "Site",
            "LongName": "Site"
        },
        "OrgUnitLegalEntities": {
            "Items": [{
                "LegalEntity": {
                    "XRefCode": "Manufacturing Co. USA ",
                    "ShortName": "Manufacturing Co. USA ",
                    "LongName": "Manufacturing Co. USA "
                },
                "EffectiveStart": "2000-01-01T00:00:00"
            }]
        },
        "OrgUnitParents": {
            "Items": [{
                "ParentOrgUnit": {
                    "ShortName": "District 01",
                    "LongName": "District 01"
                },
                "EffectiveStart": "2013-01-01T00:00:00"
            }]
        },
        "ChildOrgUnits": {
            "Items": [{
                "OrgLevel": {
                    "XRefCode": "OnSiteDepartment",
                    "ShortName": "Department",
                    "LongName": "Department"
                },
                "OrgUnitLegalEntities": {
                    "Items": []
                },
                "OrgUnitParents": {
                    "Items": [{
                        "ParentOrgUnit": {
                            "XRefCode": "Plant4",
                            "ShortName": "Plant 4",
                            "LongName": "Plant 4"
                        },
                        "EffectiveStart": "2013-01-01T00:00:00"
                    }]
                },
                "XRefCode": "Plant48",
                "ShortName": "Plant 4 - Assembly 1",
                "LongName": "Plant 4 - Assembly 1"
            }]
        },
        "XRefCode": "Plant4",
        "ShortName": "Plant 4",
        "LongName": "Plant 4"
    }
}

Security

To retrieve org unit data, the web service user's primary role must have the HCM Anywhere > Web Services > Read Data checkbox selected in the Features tab of System Admin > Roles.