TimeOffRequests

About this entity

Autotask includes a time off policy management feature that enables your company to track employee time off benefits. This entity describes a time off request (vacation, sick time, floating holiday, personal time) for an Autotask resource.

Query results depend on the proxy time entry system setting. If disabled, no results will be returned. If set to Enabled for Timesheet approvers, only time off requests for which the API user can impersonate an approver will be returned. If set to Enabled for Timesheet Approvers and Admins, the API will return all time off requests.

Context

The TimeOffRequests entity, in conjunction with ResourceTimeOffApprovers, TimeOffRequestsApprove, and TimeOffRequestsReject support the use case where you create, approve, and reject time off requests in an external HR or time tracking system and then push those requests into Autotask.

  • You create a time off request and determine the next approval level using the TimeOffRequests endpoint
  • You determine resources that can approve the next level for a time off request using the ResourceTimeOffApprovers endpoint
  • You approve or reject the time off request using the TimeOffRequestsApprove and TimeOffRequestsReject endpoints

Entity info

Supported request types

Can Create Can Delete Can Query Can Update Can have UDFs

true

false

true true false

Relationships

Parent Children
Resources

TimeOffRequestsApprove

TimeOffRequestsReject

Access URLs

[n] represents the zone where your database is hosted. Refer to Querying user zone information via the REST API.

Description URL
Full path https://webservices[n].autotask.net/atservicesrest/v1.0/TimeOffRequests
Entity URLs

TimeOffRequests/entityInformation (GET)
TimeOffRequests/entityInformation/fields (GET)
TimeOffRequests/{id} (GET)
TimeOffRequests/query (GET, POST)
TimeOffRequests/query/count (GET, POST)

Parent Entity URLs Resources/{parentId}/TimeOffRequests (GET)
Resources/{parentId}/TimeOffRequests/{id} (GET)
Resources/{parentId}/TimeOffRequest (PUT)
Resources/{parentId}/TimeOffRequests (PATCH)
Resources/{parentId}/TimeOffRequests (POST)

Field definitions

Field Name Description Datatype Read-Only Is Required Reference Name Picklist
approvedDateTime

The date and time the time off request was approved

datetime      
approveRejectResourceID

The resource ID of the timesheet approver

integer   Resources  
createDateTime

The date and time the time off request was created

datetime      
createdByResourceID

The resource ID of the resource who created the request, either the resource creating a proxy time off entry or the resource requesting time off

integer   Resources  
endTime

Time off is tracked in decimal hours (example: 1.25 hours). Start and end times will be ignored.

datetime      
hours

The number of hours requested in the time off request, entered in decimal hours (example: 1.25 hours). Valid ranges are -24 to 24 hours. Hours are not computed from start and end times.

decimal    
id

The unique identifier of this entity.

long    
ImpersonatorApproveRejectResourceID

The resource ID of the API user who impersonated the resource's timesheet approver.

integer   Resources  

lastApprovedLevel

 

Autotask supports up to three levels of timesheet approvers. A request is approved if the highest assigned level approver has given approval. The API user can query the last approval level to determine the next approval level and the associated approvers they need to impersonate.

integer    
lastModifiedByResourceID

The resource ID of the timesheet approver or the API user who last modified the time off request

integer   Resources  
lastModifiedDateTime

The date and time the request was last modified

datetime      
reason

The reason given by the timesheet approver or the API user impersonating them for rejecting the time off request

string (500)      
requestDate

The date time off is requested for. Each request can only be for a single day.

datetime    
resourceID

The ID of the resource who would like to take time off

integer Resources  
startTime

Time off is tracked in decimal hours (example: 1.25 hours). Start and end times will be ignored.

datetime      
status

On Create, the only status value that the API will accept is Submitted. On Update, the API will only allow a status change to Canceled. Queries will include canceled requests unless you explicitly filter them out.

integer    
timeOffRequestType

The API will only display time off request types that have the Display Code for > Time Off Requests option enabled in the UI. Refer to Internal Time Codes.

integer

 

Additional resources