PwsSaveTimeCards
Overview
This web service 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
- PwsSaveTimeCards
- serviceRequest: PwsSaveTimeCardsRq
- RequestId: Int32
- SessionTicket: String
- AdministratorComments: String
- DeleteTimeCards: PwsTimeCardRef[]
- DeleteTimeOffCards: PwsTimeCardRef[]
- EndDate: DateTime
- Estimates: PwsEstimate[]
- InsertIfNotFoundOnUpdateFlag: Boolean
- ResourceIdentity: PwsResourceRef
- SaveTimeCards: PwsTimeCardDetail[]
- SaveTimeOffCards: PwsTimeOffCardDetail[]
- SendNotificationEmailFlag: Boolean
- StartDate: DateTime
- SubmitFlag: Boolean
- Tasks: PwsProjectTaskNote[]
- SubmitSavedCardsOnlyFlag: Boolean
- SubmitTimeCardIdentity: PwsTimeCardRef
- PreserveTimeCardStatusFlag: Boolean
- serviceRequest: PwsSaveTimeCardsRq
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. | AUtZcJgtdfVGhgjNekiP9w== | |
AdministratorComments | String | No | Administrator comments for entering time on behalf of others. | Web Service Testing | |
DeleteTimeCards | No | The identity of the time card(s) that will be deleted. | |||
DeleteTimeOffCards | No | The identity of the time off time card(s) that will be deleted. | |||
EndDate | DateTime | Yes | When submitting time cards as part of this request, this is the end of the date range over which to submit cards. Only applies when SubmitFlag is true, SubmitTimeCardIdentity is not specified and SubmitSavedCardsOnlyFlag is false. | 2018-03-31T00:00:00.000Z | |
Estimates | No | The estimates to complete to be saved for a given task. This is only applicable for tasks on projects with detailed task management. | |||
InsertIfNotFoundOnUpdateFlag | Boolean | No | false | If set to 'true', if the specified time card or time off time card details refer to a card that does not exist, a new card will be inserted. Otherwise, an error will be raised. | true |
ResourceIdentity | No - unless inserting a new time card | The identity of the resource associated with the time cards, time off time cards, estimates and/or notes. | |||
SaveTimeCards | No | The details of time cards to be inserted or updated. | |||
SaveTimeOffCards | No | The details of time off time cards to be inserted or updated. | |||
SendNotificationEmailFlag | Boolean | No | true | 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. | false |
StartDate | DateTime | Yes | When submitting time cards as part of this request, this is the start of the date range over which to submit cards. Only applies when SubmitFlag is true, SubmitTimeCardIdentity is not specified and SubmitSavedCardsOnlyFlag is false. | 2018-03-09T00:00:00.000Z | |
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. To submit only the cards included in this request, specify SubmitSavedCardsOnlyFlag as 'true'. To submit all draft cards within a specified date range, specify StartDate and EndDate. | true |
Tasks | No | Notes to be saved with tasks. | |||
SubmitSavedCardsOnlyFlag | Boolean | No | false | If set to 'true', draft time cards associated with the provided resource identity will be submitted | true |
SubmitTimeCardIdentity | No | A specific time card to be submitted, see SubmitFlag. | |||
PreserveTimeCardStatusFlag - deprecated | Boolean | *** deprecated *** | *** deprecated *** |
Request Usage Example(s)
Response Format
- PwsSaveTimeCardsResponse
- PwsSaveTimeCardsResult: PwsSaveTimeCardsRs
- Messages: PwsMessage[]
- ResponseId: Int32
- Status: RequestStatus
- ServerTimestampUtc: DateTime
- EstimateResults: PwsSaveEstimateResult[]
- Locations: PwsLocationSummary[]
- SubmittedFlag: Boolean
- TaskNoteResults: PwsSaveTaskNoteResult[]
- TimeOffCardResults: PwsSaveTimeOffCardResult[]
- TimecardResults: PwsSaveTimeCardResult[]
- PwsSaveTimeCardsResult: PwsSaveTimeCardsRs
Response Elements
Element | Data Type | Description | Sample Data |
---|---|---|---|
Messages | The web service response status and message. Click here for more information. | ||
ResponseId | Int32 | Click here for more information. | 1 |
Status | Click here for more information. | ||
ServerTimestampUtc | DateTime | Click here for more information. | 2018-03-09T22:22:30.2317159Z |
EstimateResults | The results from saving time card estimates. | ||
Locations | Distinct list of locations with time cards in the results that reference them. | ||
SubmittedFlag | Boolean | If set to 'true', time cards were submitted. | true |
TaskNoteResults | The results from saving task notes. | ||
TimeOffCardResults | The results from saving time off time cards. | ||
TimecardResults | The results from saving time cards. |
Response Usage Example(s)
PwsSaveTimeCards - Common Errors and Warnings
- For all errors and warnings please refer to the Complete List of Errors and Warnings
ErrorNumber | ErrorCode | ErrorText |
---|---|---|
19093 | UnexpectedTimeCardType | Unexpected value for TimeCardType. Valid values are T or R. |
20001 | TimeCardStartDateRequired | The range start date must be specified. |
20002 | TimeCardEndDateRequired | The range end date must be specified. |
20003 | InvalidValueForTimeCardStartDate | The specified start date must be expressed as midnight UTC on the desired date. |
20004 | InvalidValueForTimeCardEndDate | The specified end date must be expressed as midnight UTC on the desired date. |
20028 | TimeCardErrors | One or more time cards or time off cards could not be saved. |
20033 | TimeCardIdentitiesRequired | One or more time card identities must be specified. |
20037 | TimeCardSplitPercentOutOfRange | The specified split percentage is out of range. Please specify a value greater than 0% and less than 100%. |
20050 | InvalidValueForTimeCardApprovalWorkflowStatus | The specified value for time card approval workflow status is invalid. Valid values are D for Draft, R for Rejected, S for Submitted, A for Approved, I for Invoiced (draft), B for Billed and M for Missing. Values of I, B and M are only valid when querying for existing data. |
20051 | InvalidValueForTimeCardType | The specified value for time card type is invalid. Valid values are T for Time Card and R for Reported Time Off. |
64161 | TimeCardResourceMismatch | The specified resource is not the same resource as is currently associated with the time card. |
64182 | TimecardHasBeenChanged | Time card has been changed by another user. |
64220 | InvalidTimeCard | A specified time card identity was incomplete. Each time card identity must specify either a time card id or time card uid. |
64222 | SpecifiedTimeCardDoesNotExist | The specified time card does not exist. |
64237 | UnexpectedErrorSavingTimeCard | There was an unexpected error while trying to save a time card. |
64239 | TimeCardWorkDateRequired | Work date is required for new time cards. |
64240 | InvalidValueForTimeCardWorkMinutes | The value specified for work minutes must be non-negative. |
64244 | UnableToUpdateTimeCard | This time card could not be updated. |
64268 | Administrator comments are required due to account settings. Occurs when you submit time cards on behalf of another resource AND the system setting at Setup-->System Settings-->Time tab called Require notifications to be sent when time is entered on behalf of a resource is true. Make sure the AdministratorComments Element is populated to sort. | |
64294 | UnexpectedTimeCardUdfValue | Unexpected UDF value provided (UDF metadata may have changed) |
64295 | TimeCardWorkDateOutOfRange | Specified work date outside of supported date range. |
64299 | OneOrMoreTimeCardsNotFound | One or more time cards does not exist. |
64314 | CannotChangeStatusOfFroTimecards | Cannot change the status of for reporting only time cards. |
64318 | CannotChangeSubmittedTimecardsApClosed | Cannot save changes to submitted time card because the accounting period is closed for time. |
64332 | TimeCardHasBeenDeleted | Referenced time card is deleted. |
64333 | TimeOffCardHasBeenDeleted | Referenced time off card is deleted. |
64334 | SaveCardTimeCardHasBeenDeleted | Referenced time card is deleted. |
64335 | NoPermissionToSaveTimeCard | You do not have permission to save time card. |
64338 | SplitCardTimeCardHasBeenDeleted | Referenced time card is deleted. |
64340 | SubmitCardTimeCardHasBeenDeleted | Referenced time card is deleted. |