Update Employee Time Off Policy Assignment

Updates one of an employee's time off policy assignments using JSON Merge Patch semantics: a field left out of the body keeps its current value, and at least one of policyId and effectiveDate must be present. policyId reassigns the employee to another policy in the same time off category; reassigning to a policy in a different category is rejected, since that is an assignment for the other category and is created with POST. effectiveDate moves the date the assignment takes effect (the accrual basis date for accruing policies); it must not precede the employee's hire date, and on an assignment that has already ended it must not pass the end date. endDate is server managed and not accepted. The change is recorded the way the admin UI records it: the addressed assignment is kept as an audit copy with status SUPERSEDED and a new assignment carrying the requested policy and effective date takes its place, so the response's id differs from assignmentId whenever something changed. The superseded assignment keeps its own dates; it is an audit copy. The employee holds at most one assignment per category at any point in time and this call keeps that true: an assignment in the category that starts on or after the new effective date and no later than this assignment's end date is archived (no longer in effect, kept as history, whether or not it had already taken effect), and the assignment that preceded this one is re-ended at the day before the new effective date. Assignments that start after this one ends are not affected. Everything the call changed, the superseded assignment included, is returned in supersededAssignments in its post-write state; archived assignments are not listed anywhere else. Accruals for the category are recalculated from the earliest date the change affects. A body whose values equal the assignment's current values would change nothing and is refused with 409, as on assign. Accepts both application/merge-patch+json and application/json.

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.

integer
required

The ID of the active policy assignment to update, as returned by the list endpoint.

Body Params

Data contract for partially updating an employee's time off policy assignment. Both fields are optional but at least one must be supplied; a field left out keeps its current value. Neither field accepts null, and endDate is server managed and not accepted.

integer

The id of the time off policy to reassign the employee to. Must be an existing, non-deleted policy in the same time off category as the assignment being updated. The assignment keeps its effective date unless effectiveDate is supplied too, so the employee's history for the category is recalculated under the new policy from that date.

date

The new 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, and on an assignment that has already ended must not pass its end date.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/merge-patch+json

Generated from available request 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