POST Labor Metrics

Dayforce RESTful Web Services Developer Guide

Version
R2025.2.1
POST Labor Metrics

Dayforce RESTful services use the POST verb to create an instance of the resource. In the case of the Labor Metrics resource, POST refers to creating a new labor metric code.

Endpoint URL

The URL for POST Labor Metrics uses the following base URL:

https://www.dayforcehcm.com/api/CompanyName/V1/LaborMetrics

Important: This request writes data into Dayforce. When using this request, be sure that the consuming application/requester is using the correct Dayforce instance (for example, Test or Production). Watch out for inadvertently updating the wrong instance of Dayforce (for example, inserting test data in a production instance).

Parameters

isValidateOnly (boolean)

  • Used to specify that all of the validations need to be performed without committing any changes.
  • Use this parameter to control whether committing information to your instance of Dayforce is your responsibility. See the Important note above.
  • The URL syntax is:
    https://www.dayforcehcm.com/api/CompanyName/V1/LaborMetrics?isValidateOnly=true

Request Body

The request body contains the values that need to be inserted into the available data entities. The example below shows all of the possible fields in the correct JSON format.

{
  "ShortName": "string",
  "LongName": "string",
  "EffectiveFrom": "2022-01-07T18:05:09.164Z",
  "EffectiveEnd": "2022-01-07T18:05:09.164Z",
  "LaborMetricsCodeXRefCode": "string",
  "ClockTransferCode": "string",
  "LedgerCode": "string",
  "OrgUnitXRefCodes": [
    "string"
  ],
  "LaborMetricsTypeXRefCode": "string",
  "IsDeleted": true
}

Security

Adding a new labor metric code requires role access to the HCM Anywhere > Web Services > Patch/Post Labor Metrics Code role feature in the Features tab of System AdminRoles.