PwsSaveResourceHistory
Overview
This web service cannot append history. It replaces the entire resource history for a single resource. If you want to add a new history row, use PwsGetResource and retrieve all current history. Copy that data structure, append an additional history row, and resubmit using this web service.
The service returns the identity of the resource (PwsResourceRef)Â that has been updated.Â
Request Format
- PwsSaveResourceHistory
- serviceRequest: PwsSaveResourceHistoryRq
- RequestId: Int32
- SessionTicket: String
- History: PwsResourceHistory[]
- ResourceIdentity: PwsResourceRef
- ResourceTimestamp: String
- SetNullValuesFromResourceTypeFlag: Boolean
- serviceRequest: PwsSaveResourceHistoryRq
Request Elements
Element | Data Type | Required? | Default | Description | Sample Data |
---|---|---|---|---|---|
Int32 | No | Click here for more information. | 1 | ||
String | Yes | Click here for more information. | AaJ0FpWv/5xR3lRe/9G87g== | ||
History | Yes | The resource history records. All existing history will be replaced by the history supplied here. | |||
ResourceIdentity | Yes | The resource identity. | |||
ResourceTimestamp | String | No | This is a Base64 encoded timestamp optionally utilized for resource locking. | ||
SetNullValuesFromResourceTypeFlag | Boolean | No | false | This is used to determine whether or not to apply resource type defaults on creation of a history row as follows: If "SetNullValuesFromResourceTypeFlag" = false, then the Resource Type Settings listed below will be set to the system defaults, unless otherwise specified: - billableFlag = TRUE OR specified value - temporaryWorkerFlag = FALSE OR specified value - payCategory = S OR specified value - trackMissingTimeFlag = TRUE OR specified value - missingTimeEmailFlag = TRUE OR specified value - allowApproveOwnTimecardsFlag = TRUE OR specified value - actualHolidaysFlag = FALSE OR specified value - scheduledHolidaysFlag = FALSE OR specified value  If "SetNullValuesFromResourceTypeFlag" = true, then the Resource Type Settings listed below will be set to the default values of the associated resource type, unless otherwise specified: - billableFlag = resource type default OR specified value - temporaryWorkerFlag = resource type default OR specified value - payCategory = resource type default OR specified value - trackMissingTimeFlag = resource type default OR specified value - missingTimeEmailFlag = resource type default OR specified value - allowApproveOwnTimecardsFlag = resource type default OR specified value - actualHolidaysFlag = resource type default OR specified value - scheduledHolidaysFlag = resource type default OR specified value | false |
Request Usage Example(s)
Response Format
- PwsSaveResourceHistoryResponse
- PwsSaveResourceHistoryResult: PwsSaveResourceHistoryRs
- Messages: PwsMessage[]
- ResponseId: Int32
- Status: RequestStatus
- ServerTimestampUtc: DateTime
- History: PwsResourceHistory[]
- ResourceIdentity: PwsResourceRef
- Timestamp: String
- PwsSaveResourceHistoryResult: PwsSaveResourceHistoryRs
Response Elements
Element | Data Type | Description | Sample Data |
---|---|---|---|
Messages | The web service response status and message. Click here for more information. | ||
Int32 | Click here for more information. | 1 | |
Status | Click here for more information. | Ok | |
DateTime | Click here for more information. | 2018-11-06T20:19:31.089834Z | |
History | The new set of history records for the resource. | ||
ResourceIdentity | This structure represents the unique key fields associated with identifying a resource. | ||
Timestamp | String | This is a Base64 encoded timestamp optionally utilized for resource locking. | AAAAABCzH0w= |
Response Usage Example(s)
PwsSaveResource - Common Errors and Warnings
- For all errors and warnings please refer to the Complete List of Errors and Warnings
ErrorNumber | ErrorCode | ErrorText |
---|---|---|
50024 | EntityNotFound | Error 50024, State 3: Entity not found ### [refStructureName:PwsResourceRef] |
50218 | DateGapFoundInXml | Error 50218, State 1: Date interval gap found in input XML (entity type = PwsResourceHistory, gap date = 1-Dec-2018) |
10104 | InternalError | Error 61121, State 1: Subcontractor invoice vendor may only be specified if pay category is hourly (H) |