Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Overview


This web service replaces the entire resource history for a single resource.  A new set of history records (PwsResourceHistory) for the specified resource (PwsResourceRef) are supplied. The service returns the identity of the resource (PwsResourceRef) that has been updated. 

Request Format


PwsSaveResourceHistory Request

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

If set to 'true', resource attributes that are currently set to null will take on the values associated with the assigned resource type.

false

Request Usage Example(s)


Example 01
<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


PwsSaveResourceHistory Response

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)


Example 01
<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

50024EntityNotFound

Error 50024, State 3: Entity not found ### [refStructureName:PwsResourceRef]

50218DateGapFoundInXmlError 50218, State 1: Date interval gap found in input XML (entity type = PwsResourceHistory, gap date = 1-Dec-2018)
10104InternalErrorError 61121, State 1: Subcontractor invoice vendor may only be specified if pay category is hourly (H)
  • No labels