Assign Employee Time Off Policy

Assigns a time off policy to an employee, effective from effectiveDate. An employee holds at most one assignment per time off category at any point in time, and this call keeps that true rather than refusing: an assignment in the same category that is in force on effectiveDate is end-dated to the day before, and any assignment in that category starting on or after effectiveDate, scheduled or already in effect, is archived: it is no longer in effect for any date and is kept as history. Neither is an error: both changed assignments are returned in the response's supersededAssignments, the end-dated one with its new endDate and status ACTIVE, the archived ones with status ARCHIVED. A subsequent GET of the employee's policies shows the end-dated assignment; archived assignments are not listed anywhere else, so this response is the one place a caller sees them. The one conflict is assigning the policy the employee already holds with the same effectiveDate, which would change nothing and returns 409; that applies to any active assignment on that policy and date, scheduled or already ended, not only the one in force today. effectiveDate is required for every policy type and must not precede the employee's hire date. endDate is not accepted: new assignments are always open ended, and are ended later by unassigning or by a successor assignment. Accruals for the category are recalculated from the effective date.

OAuth Scopes: time_off:policies.write

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required

The employee ID.

Body Params

Data contract for assigning a time off policy to an employee. New assignments are always open ended, so no end date is accepted.

integer
required

The id of the time off policy to assign. Must be an existing, non-deleted policy.

date
required

The date the assignment takes effect, in ISO 8601 format (YYYY-MM-DD). For accruing policies this is the accrual basis date. Must not precede the employee's hire date. Required for every policy type, including discretionary and manual policies.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json