Articles on: API

Flexible Shift API

The Flexible Shift API in XperienceHR provides a RESTful interface for managing employee flexible work schedules via XML payloads. External systems can assign, update, or delete daily shift assignments—complete with start/end times, break durations, reporting groups, projects, and activities—ensuring accurate workforce planning and time tracking.

This API processes XML payloads submitted to the endpoint and returns structured XML responses indicating success or detailed error messages. Authentication is enforced via an API key passed as a query parameter.

By integrating the Flexible Shift API, organizations can automate schedule assignments, enforce flexible working policies, and simplify downstream payroll and reporting processes.


Overview



API Type: REST
Supported Formats: XML
API Key: Generated in the app configuration
Method: POST


Operations



Assign or Update Shift Day



Creates or updates one or more shift-day assignments.

FieldTypeRequiredDescription
loginstringEmployee login identifier.
datedateAssignment date in YYYY-MM-DD format. Must fall within the employee’s calendar.
starttimeShift start time (HH:MM).
endtimeShift end time (HH:MM).
breakDurationintegerBreak length in minutes.
ReportingGroup namestringReporting group name (must exist in system).
Project namestringProject name (must exist in system).
Activity namestringActivity name (must exist in system).


Employees must have an active Work Calendar with Flexible Working Days enabled before assigning shifts ⚠️

Endpoint



Delete Shift Day



Removes existing shift-day assignments. Include only the <login> and <date> fields.

Endpoint



Error Handling



Common errors help in debugging and correcting API usage issues.

Example 1: Not Flexible Work Calendar

Example 2: Wrong Project


HTTP Response Codes


2XX Success - Operation completed successfully.
4XX Client Error - Likely an issue with the request, such as incorrect parameters or insufficient permissions. Returns an error message in text or XML format.
5XX Server Error - Indicates a server issue. Report this error if encountered.

Updated on: 12/05/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!