POST Availability

Dayforce RESTful Web Services Developer Guide

Version
R2025.2.1
POST Availability

Dayforce RESTful services use the POST verb to create an instance of the resource. In the case of the Availability resource, POST refers to creating a new availability record for an employee.

Endpoint URL

The URL for POST Availability uses the following base URL:

https://www.dayforcehcm.com/api/CompanyName/V1/{employeeXRefCode}/EmployeeAvailability

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

employeeXRefCode (string)

Specify the XRefCode of the employee you want to create an availability record for.

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/{employeeXRefCode/EmployeeAvailability?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.

{
  "IsDefault": true,
  "EffectiveStart": "2022-02-24T23:38:41.442Z",
  "EffectiveEnd": "2022-02-24T23:38:41.442Z",
  "ManagerComments": "string",
  "Weeks": [
    {
      "Days": [
        {
          "StartTime1": "string",
          "EndTime1": "string",
          "StartTime2": "string",
          "EndTime2": "string",
          "IsAvailable": true
        }
      ]
    }
  ]
}

Security

Adding a new availability record requires role access to the HCM Anywhere > Web Services > Post Employee Availability role feature in the Features tab of System AdminRoles.