PwsGetResourceAvailableTimeOff

Overview


This web service retrieves a resource's available time off minutes. The caller can execute the web service for a specific resource identity (PwsResourceRef) and/or time off reason identity (PwsTimeOffReasonRef). The combinations include:

  • Both ResourceIdentity and TimeOffReasonIdentity specified: The available time off for the specified resource and time off reason will be returned (note: the authenticated user must have permission to view the specified resource's available time off)
  • ResourceIdentity specified, TimeOffReasonIdentity not specified: The available time off for the specified resource and all time off reasons will be returned (note: the authenticated user must have permission to view the specified resource's available time off)
  • ResourceIdentity not specified, TimeOffReasonIdentity specified: The available time off for all resources and the specified time off reason will be returned (note: the authenticated user must have permission to view one or more resource's available time off)
  • Neither ResourceIdentity nor TimeOffReasonIdentity specified: The available time off for all resources and all time off reasons will be returned (note: the authenticated user must have permission to view one or more resource's available time off)

Request Format


PwsGetResourceAvailableTimeOff Request

Request Elements


Element

Data Type

Required?

Description

Sample Data

RequestId

Int32

No

Click here for more information.

1

SessionTicket

String

Yes 

Click here for more information.

ASIpnfWeYNJkYt6nFvepDA==

EndDate

DateTime

No

The StartDate and EndDate defines the period for which to retrieve available time off data.


ResourceIdentity

PwsResourceRef

No 

The identity of the resource.


StartDate

DateTime

No 

See EndDate.


TimeOffReasonIdentity

PwsTimeOffReasonRef

No

The identity of the time off reason.


Request Usage Example(s)


Example 01
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsGetResourceAvailableTimeOff>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>ASIpnfWeYNJkYt6nFvepDA==</req:SessionTicket>
            <req:EndDate>2018-12-31T00:00:00.000Z</req:EndDate>
            <req:ResourceIdentity>
               <com:ResourceReferenceSystemId>E123</com:ResourceReferenceSystemId>
            </req:ResourceIdentity>
            <req:StartDate>2018-01-01T00:00:00.000Z</req:StartDate>
            <req:TimeOffReasonIdentity>
               <com:TimeOffReasonName>Vacation</com:TimeOffReasonName>
            </req:TimeOffReasonIdentity>
         </pws:serviceRequest>
      </pws:PwsGetResourceAvailableTimeOff>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsGetResourceAvailableTimeOff Response

Response Elements


Element

Data Type

Description

Sample Data

Messages

PwsMessage[]

The web service response status and message. Click here for more information.


ResponseId

Int32

Click here for more information.


Status

RequestStatus

Click here for more information.


ServerTimestampUtc

DateTime

Click here for more information.


ResourceAvailableTimeOffSchedule

PwsResourceAvailableTimeOffElement[]

The resource available time off schedule


Response Usage Example(s)


Example 01
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsGetResourceAvailableTimeOffResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsGetResourceAvailableTimeOffResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>                 
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-03-19T21:09:50.9182333Z</ServerTimestampUtc>
            <a:ResourceAvailableTimeOffSchedule xmlns:b="http://projectorpsa.com/DataContracts/Shared/DataAdministration/">
               <b:PwsResourceAvailableTimeOffElement>
                  <b:ResourceAvailableTimeOffDetail>
                     <b:AdditionalAvailableMinutes>4800</b:AdditionalAvailableMinutes>
                     <b:AsOfDate>2018-01-01T00:00:00Z</b:AsOfDate>
                     <b:ResourceIdentity xmlns:c="http://projectorpsa.com/DataContracts/Shared/Common/">
                        <c:ResourceDisplayName>Jack Spratt</c:ResourceDisplayName>
                        <c:ResourceId i:nil="true"/>
                        <c:ResourceReferenceSystemId>E123</c:ResourceReferenceSystemId>
                        <c:ResourceUid>1152921504607111573</c:ResourceUid>
                     </b:ResourceIdentity>
                     <b:StartingAvailableMinutes>160</b:StartingAvailableMinutes>
                     <b:TimeOffReasonIdentity xmlns:c="http://projectorpsa.com/DataContracts/Shared/Common/">
                        <c:TimeOffReasonId i:nil="true"/>
                        <c:TimeOffReasonName>Vacation</c:TimeOffReasonName>
                        <c:TimeOffReasonUid>1152921504606858293</c:TimeOffReasonUid>
                     </b:TimeOffReasonIdentity>
                  </b:ResourceAvailableTimeOffDetail>
               </b:PwsResourceAvailableTimeOffElement>
            </a:ResourceAvailableTimeOffSchedule>
         </PwsGetResourceAvailableTimeOffResult>
      </PwsGetResourceAvailableTimeOffResponse>
   </s:Body>
</s:Envelope>


PwsGetResourceAvailableTimeOff - Common Errors and Warnings


ErrorNumber

ErrorCode

ErrorText

50045ViewPermissionDeniedYou do not have permission to view this item.
57545ResourceNotFoundThe specified resource does not exist.
57567SpecifiedTimeOffReasonDoesNotExistThe specified time off reason does not exist.