AVAILABLE WITH BUSINESS SUBSCRIPTION

Method: updateWorkLeaveStatuses

Permissions to Run the Request

Account Owner, Account Administrators, Department Administrators, or custom roles

Department Administrators and users with a custom role can add a work leave status for users only from the departments they manage and their sub-departments.

Request Parameters

Parameter

Type

Description

token (required)stringAccess token. You can obtain a token by making a request.
userid (required)stringThe ID of a user you want to add a work leave status for
workLeaveReason (required)string

Reasons for work leave status:

  • OutOfTheOffice
  • OnVacation
  • PersonalLeave
  • BusinessTrip
  • SickLeave
  • ParentalLeave
  • EducationalLeave 
startDate (optional)stringThe work leave status start date. You can add it in the yyyy-mm-dd format
endDate (optional)stringThe work leave status end date. You can add it in the yyyy-mm-dd format

Possible Errors

Error

Description

Permission DeniedAn authorized user does not have enough permissions to handle the operation. For example, Department Administrator can't add work leave statuses for users from a department they don't manage
Wrong parametersSome of the sent parameters are incorrect

Sample Request

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="https://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <UpdateWorkLeaveStatusesRequest>
      <workLeaveStatuses>
         <userId>76a38065-c8b7-11ed-a616-0542ac15004f</userId>
         <workLeaveReason>SickLeave</workLeaveReason>
         <startDate>2024-01-12</startDate>
         <endDate>2024-01-15</endDate>
      </workLeaveStatuses>
      <workLeaveStatuses>
         <userId>76a38028-c8b7-11ed-a616-0542ac15004f</userId>
         <workLeaveReason>SickLeave</workLeaveReason>
         <startDate>2024-01-12</startDate>
         <endDate>2024-01-20</endDate>
      </workLeaveStatuses>
    </UpdateWorkLeaveStatusesRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML

Sample Response

SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://ispringlearn.com/go/services/api/soap">
   <SOAP-ENV:Body>
      <SuccessResult>
      </SuccessResult>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML