Versions Compared

Key

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

...

This web service retrieves time cards, based upon a list of time cards (PwsExpenseDocument), based upon a unique project identifier (PwsProjectRef) or resource identifier (PwsResourceRef) or time card identifier (PwsTimecardRef)set of criteria:

  • A specified resource (PwsResourceRef). Time cards and time off cards will be for the specified resource. If no resource is specified, time cards associated with the caller's resource, if any, will be returned. If no resource is specified, and the caller is not associated with a resource, an error is raised.
  • A specified project (PwsProjectRef). If specified, on time cards associated with the project will be included in the response. This parameter has no bearing on which time off cards are returned in the response.
  • A specified time card (PwsTimeCardRef). This can be the identity of a time card or a time off card. If specified, the results will be limited to the specified time card or time off card. Note that the specified time card must also satisfy any other applicable criteria to be included in the response.
  • Various flags control which time cards are included in the results. For example, there are flags based on each time card status to control which statuses are included.

The results are grouped by project for time cards (PwsTimeEntryProject) and by time off reason for time off cards (PwsTimeEntryTimeOff).

Request Format


Panel
titlePwsGetTimeCards Request
  • PwsGetTimeCards
    • serviceRequest: PwsGetTimeCardsRq
      • RequestId: Int32
      • SessionTicket: String
      • EndDate: DateTime
      • IncludeApprovedFlag: Boolean
      • IncludeBookedAndAssignedRolesFlag: Boolean
      • IncludeDraftFlag: Boolean
      • IncludeReferencedTasksOnlyFlag: Boolean
      • IncludeReferencedTimeOffReasonsOnlyFlag: Boolean
      • IncludeRejectedFlag: Boolean
      • IncludeSubmittedFlag: Boolean
      • IncludeTimeCardsFlag: Boolean
      • IncludeTimeOffCardsFlag: Boolean
      • ProjectIdentity: PwsProjectRef
      • ResourceIdentity: PwsResourceRef
      • StartDate: DateTime
      • IncludeTaskHierarchyFlag: Boolean
      • AutoMemorizeBookedAndAssignedRolesFlag: Boolean
      • IncludeMemorizedRolesAndTasksFlag: Boolean
      • RespectMemorizedRemovedRolesAndTasksFlag: Boolean
      • TimeCardIdentity: PwsTimecardRef PwsTimeCardRef

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No


Click here for more information.

1

SessionTicket

String

Yes


Click here for more information.

AdW9hL5iEq/mAQnDQ5AweA==

EndDate

DateTime

Yes


The end date (in midnight UTC) , the time cards that are to be retrieved must have an actual or planned work date prior to this dateof a time period. The StartDate and EndDate together define the period in which the time cards will be retrieved. The time cards that are to be retrieved must be dated on or after the StartDate and on or prior to the EndDate.

2018-12-31T00:00:00.000Z

IncludeApprovedFlag

Boolean

No

false

If set to 'true', approved time cards will be included in the response.

false

IncludeBookedAndAssignedRolesFlag

Boolean

No

false

If set to 'true', projects on which the resource is booked for hours during the period or booked or requested on a role that is assigned to a task that is active during the period are included, regardless of whether time cards exist. Active tasks are tasks whose planned dates overlap with this period, or whose planned dates are prior to the period but is not marked complete.

true

IncludeDraftFlag

Boolean

No

false

If set to 'true', draft time cards will be included in the response.

true

IncludeReferencedTasksOnlyFlag

Boolean

No

false

If set to 'true', only tasks that are referred to by existing time cards will be included in the response.

true

IncludeReferencedTimeOffReasonsOnlyFlag

Boolean

No

false

If set to 'true', only time off reaons that are referred to by existing time off cards will be included in the response.

true

IncludeRejectedFlag

Boolean

No

false

If set to 'true', rejected time cards will be included in the response.

false

IncludeSubmittedFlag

Boolean

No

false

If set to 'true', submitted time cards will be included in the response.

true

IncludeTimeCardsFlag

Boolean

No

false

If set to 'true', time cards associated with a project (as opposed to time off cards) will be included in the response.

true

IncludeTimeOffCardsFlag

Boolean

No

false

If set to 'true, time off cards associated with a time off reason will be included in the response response.

false

ProjectIdentity

PwsProjectRef

NoIdentity of project, if requesting time cards for a single project




ResourceIdentity

PwsResourceRef

No

This structure represents the unique key fields associated with identifying the resource. If a

PwsResourceRef

Yes/No


The ResourceIdentity is not specified, the authenticated resource identity will be used. If the resource identity is supplied and, it differs from the authenticated user, the authenticated user must have permission to view the specified resource's time cards, otherwise the service will failrequired, but practically speaking should always be specified.

The field is not required because we'll fall back to the user/resource that the web service request came from. However, if that user has no resource profile, you'll get a 50406 error.


StartDate

DateTime

Yes


The start date (in midnight UTC) , the time cards that are to be retrieved must have an actual or planned work date after this dateof a time period. The StartDate and EndDate together define the period in which the time cards will be retrieved.The time cards that are to be retrieved must be dated on or after the StartDate and on or prior to the EndDate.

2018-01-01T00:00:00.000Z

IncludeTaskHierarchyFlag

Boolean

No

false

If set to 'true', all the entire task hierarchy of the task associated with the time card(s) will be included.

false

AutoMemorizeBookedAndAssignedRolesFlag

Boolean

No

false

If set to 'true', anything that was on the timesheet last week will be on it this week. If set to 'false', timesheet start from scratch each week. This is intended for internal use and you likely want to set this to false.

false

IncludeMemorizedRolesAndTasksFlag

Boolean

No

false

If set to 'true', memorized roles and tasks will be included in the response. Memorized roles and tasks are roles that may not have any time cards associated with them, but have been explicitly added to a resource's time sheet through the Projector UI.

false

RespectMemorizedRemovedRolesAndTasksFlag

Boolean

No

false

If set to 'true', roles and tasks that were removed from the timesheet will be excluded from the responseIf set to 'true', roles and tasks that were removed from the timesheet will be excluded from the response. Again, this refers to rows on a resource's time sheet that may be connected to tasks that the resource is assigned to, but have been explicitly removed from the resource's timesheet through the Projector UI.

false

TimeCardIdentity

PwsTimecardRefPwsTimeCardRef

No


Identity of the time card, if request requesting a single time card. This can refer to a time card or a time off card.


Request Usage Example(s)


Code Block
languagexml
titleExample 01
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:PwsGetTimeCards>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>AdW9hL5iEq/mAQnDQ5AweA==</req:SessionTicket>
            <tim:EndDate>2018-12-31T00:00:00.000Z</tim:EndDate>
            <tim:IncludeApprovedFlag>false</tim:IncludeApprovedFlag>
            <tim:IncludeBookedAndAssignedRolesFlag>true</tim:IncludeBookedAndAssignedRolesFlag>
            <tim:IncludeDraftFlag>true</tim:IncludeDraftFlag>
            <tim:IncludeReferencedTasksOnlyFlag>true</tim:IncludeReferencedTasksOnlyFlag>
            <tim:IncludeReferencedTimeOffReasonsOnlyFlag>true</tim:IncludeReferencedTimeOffReasonsOnlyFlag>
            <tim:IncludeRejectedFlag>false</tim:IncludeRejectedFlag>
            <tim:IncludeSubmittedFlag>true</tim:IncludeSubmittedFlag>
            <tim:IncludeTimeCardsFlag>true</tim:IncludeTimeCardsFlag>
            <tim:IncludeTimeOffCardsFlag>false</tim:IncludeTimeOffCardsFlag>
            <tim:ProjectIdentity>
               <com:ProjectCode>P001395-001</com:ProjectCode>
            </tim:ProjectIdentity>
            <tim:StartDate>2018-01-01T00:00:00.000Z</tim:StartDate>
            <tim:IncludeTaskHierarchyFlag>false</tim:IncludeTaskHierarchyFlag>
            <tim:AutoMemorizeBookedAndAssignedRolesFlag>false</tim:AutoMemorizeBookedAndAssignedRolesFlag>
            <tim:IncludeMemorizedRolesAndTasksFlag>false</tim:IncludeMemorizedRolesAndTasksFlag>
            <tim:RespectMemorizedRemovedRolesAndTasksFlag>false</tim:RespectMemorizedRemovedRolesAndTasksFlag>
         </pws:serviceRequest>
      </pws:PwsGetTimeCards>
   </soapenv:Body>
</soapenv:Envelope>

...

Panel
titlePwsGetTimeCards Response

Response Elements


Element

Data Type

Description

Sample Data

Messages

PwsMessage[]

 The 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.

Ok
ServerTimestampUtc

DateTime

Click here for more information.

2018-03-06T20:16:49.6052125Z 

Locations

PwsLocationSummary[???]

The location(s) associated with the time card(s).


TimeEntryProjects

PwsTimeEntryProject[???]

The project(s) associated with the time card(s). The actual time cards included in the response are grouped by project here.


TimeEntryTimeOff

PwsTimeEntryTimeOff[???]

The time off reason(s) associated with the time card(s). The actual time off cards included in the response are grouped by time off reason here.


Response Usage Example(s)

...