Skip to content

endpoints.TimeOff.TimeOff

Yaroslav Surzhikov edited this page Aug 7, 2020 · 1 revision

TimeOff methods

submit_request

 | submit_request(
       employee_id,
       policy_type,
       start_date,
       end_date,
       description='',
       start_date_portion='all_day',
       end_date_portion='all_day',
       skip_manager_approval=False
   )

Submits a new time off request.

Arguments:

  • employee_id str - employee id
  • policy_type str - Request policy type, e.g. Holiday, Sick or any custom type defined
  • start_date date - Date of the first day of the time off
  • end_date date - Date of the last day of the time off
  • description str - request reason
  • start_date_portion str - Portion of the first day (all_day, morning, afternoon)
  • end_date_portion str - Portion of the last day (all_day, morning, afternoon)
  • skip_manager_approval bool - Admins only can skip the approval policy, setting this field to true will create an approved request

References:


get_request_by_id

 | get_request_by_id(employee_id, request_id)

Supplies detailed info about an existing time off request.

Arguments:

  • employee_id str - employee id
  • request_id str - request id

References:


cancel_request

 | cancel_request(employee_id, request_id)

Cancels an existing time off request.

Arguments:

  • employee_id str - employee id
  • request_id str - request id

References:


get_requests_since_date

 | get_requests_since_date(since)

Returns the list of time off requests approved or canceled since the specified date.

Arguments:

  • since datetime.datetime - Timestamp starting from which to return the changes. Should be in ISO-8601 format, e.g. 2007-04-05T14:30:24.345Z or 2007-04-05T12:30-02:00

References:


who_is_out

 | who_is_out(since, until)

Returns time off information for a given date range.

Arguments:

  • since date - Start period date
  • until date - End period date

References:


who_is_out_today

 | who_is_out_today(today=None)

Returns the list of people that have a time off request today or on the specified date.

Arguments:

  • today date - Date to report out of the office. If not specified, the date at UTC at the time of the request is used

References:

Clone this wiki locally