Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview


This web service inserts or updates time card(s) and/or time off time card(s) based on a detailed time card / time off time card structure (PwsTimeCardDetail). This web service also deletes time card(s) and/or time off time card(s) based on a time card or time off time card reference structure (PwsTimeCardRef). saves changes to time cards. This service should be used to save changes to existing time cards, to insert new time cards or to delete time cards. It is also capable of saving estimates (remaining minutes), saving task notes and performing a submit operation.
The service is written such that a failure to save or delete a time card or time off card, or to save an estimate or task note, will not prevent the saving of other changes, however any failure to save will prevent the submit from occurring, even if the service requests it. Individual errors processing time cards, time off cards, estimates and task notes are reported in the response.

Request Format


Panel
titlePwsSaveTimeCards Request

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

 

 

No


Click here for more information.

  


SessionTicket

String

 

Yes


Click here for more information.

  


AdministratorComments

String

 

 

 

 

No


Administrator comments for entering time on behalf of others


DeleteTimeCards

PwsTimeCardRef [???]

 

 

 

 

No


The identity of the time card(s) that will be deleted


DeleteTimeOffCards

PwsTimeCardRef [???]

 

 

 

 

No


The identity of the time off time card(s) that will be deleted


EndDate

DateTime

 

 

 

 

Yes


The EndDate defines the last work or time off date that affected time cards can be logged against. Only time cards with work or time off dates prior to this EndDate will be included when the web service is executed.


Estimates

PwsEstimate [???]

 

 

 

No


The estimate to complete for a given task. This is only applicable for time cards logged against a project with detailed task management.


InsertIfNotFoundOnUpdateFlag

Boolean

  

No

 

 

 

false

If set to 'true', the specified time card or time off time card details will be inserted as a new time card or time off time card if it does not currently exist


ResourceIdentity

PwsResourceRef

 

 

 

 

No - unless inserting a new time card


The identity of the resource associated with the time card or time off time card


SaveTimeCards

PwsTimeCardDetail [???]

 

 

 

 

No - unless inserting a new time card


The details of the time card to be saved / updated


SaveTimeOffCards

PwsTimeOffCardDetail [???]

 

 

 

No - unless inserting a new time off time card


The details of the time off time card to be saved / updated


SendNotificationEmailFlag

Boolean

  

No

 

 

false

If set to 'true', a notification email will be sent to the resource associated with the time card. This is applicable only when entering time on behalf of others.


StartDate

DateTime

 

 

 

 

Yes


The StartDate defines the first work or time off date that affected time cards can be logged against. Only time cards with work or time off dates after this StartDate will be included when the web service is executed.


SubmitFlag

Boolean

  

No

 

 

false

If set to 'true', a submit operation will be performed as part of this request. To submit a specific time card or time off card, use SubmitTimeCardIdentity.


Tasks

PwsProjectTaskNote [???]

 

 

 

 

No


Notes to be saved with the task associated with the time card


SubmitSavedCardsOnlyFlag

Boolean

  

No

 

 

 

false

If set to 'true', draft time cards associated with the provided resource identity will be submitted


SubmitTimeCardIdentity

PwsTimeCardRef

 

 

 

No


The specific time card(s) to be submitted, see SubmitFlag


PreserveTimeCardStatusFlag

Boolean

 

No

 

 

 

Request Usage Example(s)

false

If set to 'true', the time card status of the affected time card(s) will be preserved


Request Usage Example(s)


Code Block
languagexml
titleExample 01 - saving a new time card
collapsetrue
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:tim="http://projectorpsa.com/DataContracts/Shared/TimeAndCost/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveTimeCards>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>AUtZcJgtdfVGhgjNekiP9w==</req:SessionTicket>
            <tim:AdministratorComments>Web Service Testing</tim:AdministratorComments>
            <tim:EndDate>2018-03-31T00:00:00.000Z</tim:EndDate>
            <tim:Estimates>
               <tim:PwsEstimate>
                  <tim:AsOfDate>2018-03-09T00:00:00.000Z</tim:AsOfDate>
                  <tim:CompletedFlag>false</tim:CompletedFlag>
                  <tim:ProjectTaskRoleIdentity>
                     <com:ProjectRoleIdentity>
                        <com:ProjectRoleUid>1152921504609525049</com:ProjectRoleUid>
                     </com:ProjectRoleIdentity>
                     <com:ProjectTaskIdentity>
                        <com:ProjectTaskUid>1152921504608637344</com:ProjectTaskUid>
                     </com:ProjectTaskIdentity>
                     <com:ProjectTaskRoleUid>1152921504608549426</com:ProjectTaskRoleUid>
                  </tim:ProjectTaskRoleIdentity>
                  <tim:RemainingMinutes>360</tim:RemainingMinutes>
               </tim:PwsEstimate>
            </tim:Estimates>
            <tim:InsertIfNotFoundOnUpdateFlag>true</tim:InsertIfNotFoundOnUpdateFlag>
            <tim:ResourceIdentity>
               <com:ResourceReferenceSystemId>E123</com:ResourceReferenceSystemId>
            </tim:ResourceIdentity>
            <tim:SaveTimeCards>
               <tim:PwsTimecardDetail>
                  <com:TimecardType>T</com:TimecardType>
                  <tim:DescriptionClearFlag>false</tim:DescriptionClearFlag>
                  <tim:Status>Submitted</tim:Status>
                  <tim:WorkDate>2018-03-09T00:00:00.000Z</tim:WorkDate>
                  <tim:WorkMinutes>60</tim:WorkMinutes>
                  <tim:CardStatus>Submitted</tim:CardStatus>
                  <tim:LocationClearFlag>false</tim:LocationClearFlag>
                  <tim:LocationIdentity>
                     <com:LocationName>USA</com:LocationName>
                  </tim:LocationIdentity>
                  <tim:ProjectIdentity>
                     <com:ProjectCode>P001396-001</com:ProjectCode>
                  </tim:ProjectIdentity>
                  <tim:ProjectRateTypeIdentity>
                     <com:ProjectRateTypeUid>1152921504607370468</com:ProjectRateTypeUid>
                  </tim:ProjectRateTypeIdentity>
                  <tim:ProjectTaskIdentity>
                     <com:ProjectTaskUid>1152921504608637344</com:ProjectTaskUid>
                  </tim:ProjectTaskIdentity>
                  <tim:RoleClearFlag>false</tim:RoleClearFlag>
                  <tim:RoleIdentity>
                     <com:ProjectRoleUid>1152921504609525049</com:ProjectRoleUid>
                  </tim:RoleIdentity>
                  <tim:Udf1ClearFlag>false</tim:Udf1ClearFlag>
                  <tim:Udf2ClearFlag>false</tim:Udf2ClearFlag>
                  <tim:ExternalGroupingIdentifierClearFlag>false</tim:ExternalGroupingIdentifierClearFlag>
               </tim:PwsTimecardDetail>
            </tim:SaveTimeCards>
            <tim:SendNotificationEmailFlag>false</tim:SendNotificationEmailFlag>
            <tim:StartDate>2018-03-09T00:00:00.000Z</tim:StartDate>
            <tim:SubmitFlag>true</tim:SubmitFlag>
            <tim:Tasks>
               <tim:PwsProjectTaskNote>
                  <tim:Notes>Added via the web service</tim:Notes>
                  <tim:ProjectTaskIdentity>
                     <com:ProjectTaskUid>1152921504608637344</com:ProjectTaskUid>
                  </tim:ProjectTaskIdentity>
                  <tim:EmailPmTeamFlag>false</tim:EmailPmTeamFlag>
               </tim:PwsProjectTaskNote>
            </tim:Tasks>
            <tim:SubmitSavedCardsOnlyFlag>false</tim:SubmitSavedCardsOnlyFlag>
            <tim:PreserveTimeCardStatusFlag>true</tim:PreserveTimeCardStatusFlag>
         </pws:serviceRequest>
      </pws:PwsSaveTimeCards>
   </soapenv:Body>
</soapenv:Envelope>
Code Block
languagexml
titleExample 02 - saving a new time off time card
collapsetrue
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:tim="http://projectorpsa.com/DataContracts/Shared/TimeAndCost/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveTimeCards>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>AUtZcJgtdfVGhgjNekiP9w==</req:SessionTicket>
            <tim:AdministratorComments>Web Service Testing</tim:AdministratorComments>
            <tim:EndDate>2018-03-31T00:00:00.000Z</tim:EndDate>
            <tim:InsertIfNotFoundOnUpdateFlag>true</tim:InsertIfNotFoundOnUpdateFlag>
            <tim:ResourceIdentity>
               <com:ResourceReferenceSystemId>E123</com:ResourceReferenceSystemId>
            </tim:ResourceIdentity>
            <tim:SaveTimeOffCards>
               <tim:PwsTimeOffCardDetail>
                  <tim:Description>Vacation Day</tim:Description>
                  <tim:DescriptionClearFlag>false</tim:DescriptionClearFlag>
                  <tim:Status>Draft</tim:Status>
                  <tim:WorkDate>2018-03-21T00:00:00.000Z</tim:WorkDate>
                  <tim:WorkMinutes>480</tim:WorkMinutes>
                  <tim:CardStatus>D</tim:CardStatus>
                  <tim:TimeOffReasonIdentity>
                     <com:TimeOffReasonName>Vacation</com:TimeOffReasonName>
                  </tim:TimeOffReasonIdentity>
               </tim:PwsTimeOffCardDetail>
            </tim:SaveTimeOffCards>
            <tim:SendNotificationEmailFlag>false</tim:SendNotificationEmailFlag>
            <tim:StartDate>2018-03-09T00:00:00.000Z</tim:StartDate>
            <tim:SubmitFlag>true</tim:SubmitFlag>
            <tim:Tasks>
               <tim:PwsProjectTaskNote>
                  <tim:Notes>Added via the web service</tim:Notes>
                  <tim:ProjectTaskIdentity>
                     <com:ProjectTaskUid>1152921504608637344</com:ProjectTaskUid>
                  </tim:ProjectTaskIdentity>
                  <tim:EmailPmTeamFlag>false</tim:EmailPmTeamFlag>
               </tim:PwsProjectTaskNote>
            </tim:Tasks>
            <tim:SubmitSavedCardsOnlyFlag>false</tim:SubmitSavedCardsOnlyFlag>
            <tim:PreserveTimeCardStatusFlag>true</tim:PreserveTimeCardStatusFlag>
         </pws:serviceRequest>
      </pws:PwsSaveTimeCards>
   </soapenv:Body>
</soapenv:Envelope>
Code Block
languagexml
titleExample 03 - deleting a time card
collapsetrue
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:tim="http://projectorpsa.com/DataContracts/Shared/TimeAndCost/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveTimeCards>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>AUtZcJgtdfVGhgjNekiP9w==</req:SessionTicket>
            <tim:AdministratorComments>Web Service Testing</tim:AdministratorComments>
            <tim:DeleteTimeCards>
               <com:PwsTimecardRef>
                  <com:TimecardUid>1152921504646141266</com:TimecardUid>
               </com:PwsTimecardRef>
            </tim:DeleteTimeCards>
            <tim:EndDate>2018-03-31T00:00:00.000Z</tim:EndDate>
            <tim:ResourceIdentity>
               <com:ResourceReferenceSystemId>E123</com:ResourceReferenceSystemId>
            </tim:ResourceIdentity>
            <tim:SendNotificationEmailFlag>false</tim:SendNotificationEmailFlag>
            <tim:StartDate>2018-03-09T00:00:00.000Z</tim:StartDate>
            <tim:SubmitFlag>true</tim:SubmitFlag>
            <tim:PreserveTimeCardStatusFlag>true</tim:PreserveTimeCardStatusFlag>
         </pws:serviceRequest>
      </pws:PwsSaveTimeCards>
   </soapenv:Body>
</soapenv:Envelope>


Response Format


Panel
titlePwsSaveTimeCards Response

Response Elements

Element

Data Type

Required?

Default

Description

Sample Data

Messages

PwsMessage[]

 

 

 

 





ResponseId

Int32

 

 



Click here for more information.

 


Status

RequestStatus

 

 



Click here for more information.

 


ServerTimestampUtc

DateTime

 

 



Click here for more information.

 


EstimateResults

PwsSaveEstimateResult[]

 

 

 

 





Locations

PwsLocationSummary[]

 

 

 

 





SubmittedFlag

Boolean

 

 

 

 





TaskNoteResults

PwsSaveTaskNoteResult[]

 

 

 

 





TimeOffCardResults

PwsSaveTimeOffCardResult[]

 

 

 

 





TimecardResults

PwsSaveTimeCardResult[]