You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 9
Next »
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 you could PwsGetResouce which retrieves all their current history. You can then 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
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. | AaJ0FpWv/5xR3lRe/9G87g== |
History | PwsResourceHistory[] | Yes |
| The resource history records. All existing history will be replaced by the history supplied here. |
|
ResourceIdentity | PwsResourceRef | 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. If you pass 'True' we use the defaults. If you pass 'False' we assume the following: - billableFlag = TRUE
- temporaryWorkerFlag = FALSE
- payCategory = S
- trackMissingTimeFlag = TRUE
- missingTimeEmailFlag = TRUE
- allowApproveOwnTimecardsFlag = TRUE
- actualHolidaysFlag = FALSE
- scheduledHolidaysFlag = FALSE
These settings can be overridden on a per history row basis by specifying another value. | false |
Request Usage Example(s)
<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:PwsSaveResourceHistory>
<pws:serviceRequest>
<req:RequestId>1</req:RequestId>
<req:SessionTicket>AaJ0FpWv/5xR3lRe/9G87g==</req:SessionTicket>
<req:History>
<com:PwsResourceHistory>
<com:BeginDate>2018-11-01T00:00:00.000Z</com:BeginDate>
<com:Record>
<com:ActualHolidaysFlag>true</com:ActualHolidaysFlag>
<com:AllowApproveOwnTimecardsFlag>true</com:AllowApproveOwnTimecardsFlag>
<com:BillableFlag>true</com:BillableFlag>
<com:CostCenterIdentity>
<com:CostCenterName>IT Team (USA)</com:CostCenterName>
<com:CostCenterNumber>IT Team (USA)</com:CostCenterNumber>
</com:CostCenterIdentity>
<com:ExpenseReportVendorIdentity>
<com:VendorName>Credit Card</com:VendorName>
<com:VendorNumber>Credit Card</com:VendorNumber>
</com:ExpenseReportVendorIdentity>
<com:InactiveFlag>false</com:InactiveFlag>
<com:LocationIdentity>
<com:LocationName>USA</com:LocationName>
</com:LocationIdentity>
<com:MissingTimeEmailFlag>true</com:MissingTimeEmailFlag>
<com:PayCategory>O</com:PayCategory>
<com:RdcException>
<com:CurrencyIdentity>
<com:CurrencyCode>USD</com:CurrencyCode>
</com:CurrencyIdentity>
<com:HourlyRate>55.15</com:HourlyRate>
</com:RdcException>
<com:ResourceTypeIdentity>
<com:ResourceTypeCode>FTE</com:ResourceTypeCode>
<com:ResourceTypeName>Full Time Employee</com:ResourceTypeName>
</com:ResourceTypeIdentity>
<com:ScheduledHolidaysFlag>false</com:ScheduledHolidaysFlag>
<com:TemporaryWorkerFlag>false</com:TemporaryWorkerFlag>
<com:TitleIdentity>
<com:DepartmentIdentity>
<com:DepartmentName>IT Team</com:DepartmentName>
</com:DepartmentIdentity>
<com:TitleName>Level 2</com:TitleName>
</com:TitleIdentity>
<com:TrackMissingTimeFlag>true</com:TrackMissingTimeFlag>
<com:WorkingScheduleOverrides>
<com:PwsResourceWorkingScheduleDay>
<com:DayOfWeek>Friday</com:DayOfWeek>
<com:StartTimeMinutesSinceMidnight>540</com:StartTimeMinutesSinceMidnight>
<com:WorkingMinutes>240</com:WorkingMinutes>
</com:PwsResourceWorkingScheduleDay>
</com:WorkingScheduleOverrides>
</com:Record>
</com:PwsResourceHistory>
</req:History>
<req:ResourceIdentity>
<com:ResourceDisplayName>Ben Smith</com:ResourceDisplayName>
<com:ResourceReferenceSystemId>E1101</com:ResourceReferenceSystemId>
</req:ResourceIdentity>
<req:SetNullValuesFromResourceTypeFlag>false</req:SetNullValuesFromResourceTypeFlag>
</pws:serviceRequest>
</pws:PwsSaveResourceHistory>
</soapenv:Body>
</soapenv:Envelope>
Response Format
- PwsSaveResourceHistoryResponse
- PwsSaveResourceHistoryResult: PwsSaveResourceHistoryRs
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. | 1 |
Status | RequestStatus | Click here for more information. | Ok |
ServerTimestampUtc | DateTime | Click here for more information. | 2018-11-06T20:19:31.089834Z |
History | PwsResourceHistory[] | The new set of history records for the resource. |
|
ResourceIdentity | PwsResourceRef | 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)
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<PwsSaveResourceHistoryResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
<PwsSaveResourceHistoryResult 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-11-06T20:19:31.089834Z</ServerTimestampUtc>
<a:History xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:PwsResourceHistory>
<b:BeginDate>2018-11-01T00:00:00Z</b:BeginDate>
<b:EndDate i:nil="true"/>
<b:Record>
<b:ActualHolidaysFlag>true</b:ActualHolidaysFlag>
<b:AllowApproveOwnTimecardsFlag>true</b:AllowApproveOwnTimecardsFlag>
<b:BillableFlag>true</b:BillableFlag>
<b:CostCenterIdentity>
<b:CostCenterId i:nil="true"/>
<b:CostCenterName>IT Team (USA)</b:CostCenterName>
<b:CostCenterNumber>IT Team (USA)</b:CostCenterNumber>
<b:CostCenterUid>1152921504606867365</b:CostCenterUid>
</b:CostCenterIdentity>
<b:ExpenseReportVendorIdentity>
<b:VendorId i:nil="true"/>
<b:VendorName>Credit Card</b:VendorName>
<b:VendorUid>1152921504606942269</b:VendorUid>
<b:VendorNumber>Credit Card</b:VendorNumber>
</b:ExpenseReportVendorIdentity>
<b:InactiveFlag>false</b:InactiveFlag>
<b:LocationIdentity>
<b:LocationId i:nil="true"/>
<b:LocationName>USA</b:LocationName>
<b:LocationUid>1152921504606855985</b:LocationUid>
</b:LocationIdentity>
<b:MissingTimeEmailFlag>true</b:MissingTimeEmailFlag>
<b:PayCategory>O</b:PayCategory>
<b:RdcException>
<b:CurrencyIdentity>
<b:CurrencyCode>USD</b:CurrencyCode>
<b:CurrencyId i:nil="true"/>
<b:CurrencyUid>1152921504606851838</b:CurrencyUid>
</b:CurrencyIdentity>
<b:HourlyRate>55.15</b:HourlyRate>
</b:RdcException>
<b:ResourceTypeIdentity>
<b:ResourceTypeCode>FTE</b:ResourceTypeCode>
<b:ResourceTypeId i:nil="true"/>
<b:ResourceTypeName>Full Time Employee</b:ResourceTypeName>
<b:ResourceTypeUid>1152921504606847348</b:ResourceTypeUid>
</b:ResourceTypeIdentity>
<b:ScheduledHolidaysFlag>false</b:ScheduledHolidaysFlag>
<b:SubcontractorInvoiceVendorIdentity i:nil="true"/>
<b:TemporaryWorkerFlag>false</b:TemporaryWorkerFlag>
<b:TimeAndCostGlccOverride i:nil="true"/>
<b:TitleIdentity>
<b:DepartmentIdentity>
<b:DepartmentId i:nil="true"/>
<b:DepartmentName>IT Team</b:DepartmentName>
<b:DepartmentUid>1152921504606854184</b:DepartmentUid>
</b:DepartmentIdentity>
<b:TitleId i:nil="true"/>
<b:TitleName>Level 2</b:TitleName>
<b:TitleUid>1152921504606876416</b:TitleUid>
</b:TitleIdentity>
<b:TrackMissingTimeFlag>true</b:TrackMissingTimeFlag>
<b:WorkingScheduleOverrides>
<b:PwsResourceWorkingScheduleDay>
<b:DayOfWeek>Friday</b:DayOfWeek>
<b:StartTimeMinutesSinceMidnight>540</b:StartTimeMinutesSinceMidnight>
<b:WorkingMinutes>240</b:WorkingMinutes>
</b:PwsResourceWorkingScheduleDay>
</b:WorkingScheduleOverrides>
</b:Record>
</b:PwsResourceHistory>
</a:History>
<a:ResourceIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:ResourceDisplayName>Ben Smith</b:ResourceDisplayName>
<b:ResourceId i:nil="true"/>
<b:ResourceReferenceSystemId>E1101</b:ResourceReferenceSystemId>
<b:ResourceUid>1152921504607131537</b:ResourceUid>
</a:ResourceIdentity>
<a:Timestamp>AAAAABCzH0w=</a:Timestamp>
</PwsSaveResourceHistoryResult>
</PwsSaveResourceHistoryResponse>
</s:Body>
</s:Envelope>
PwsSaveResource - Common 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) |