PwsSaveProjectRateTypes

Overview


This web service replaces the entire collection of project rate types on the specified project with the new designated collection.

Request Format


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

Ab62GYARtqWE8wJFv6Pd8g==

LocksToSteal

PwsEntityLockSummary[1..100]

No


The detailed information of the locks that are to be stolen. If not specified, the request will fail if any requested locks are already held. If specified, the information supplied must exactly match the current state of existing locks or the attempt to steal the existing locks will fail. Typically, this service is invoked with LocksToSteal empty or null. If there are existing locks, they will be returned in the LockHolders member of PwsFault. This data can then be sent, as is, back to the server in a second invocation of this service, as LocksToSteal, if the caller desires to steal the locks.


ProjectIdentity

PwsProjectRef

 Yes


The identity of the project. Click here for more information.


ProjectRateTypes

PwsProjectRateTypeDetail [1..100]

 Yes


The full collection of rate types for the project to replace the prior full collection.


ProjectorLockSetId

Int32

 No


A projector lock set id is an identifier for a group of one or more locks held as a unit.


RateTaskTimestamp

String

No 


This is an optimistic locking timestamp that, if provided on update request, will cause the request to fail when the timestamp stored in the database does not match the provided value.


Request Usage Example(s)


PwsSaveProjectRateTypesRequest
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:sch="http://projectorpsa.com/DataContracts/Shared/Scheduling/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveProjectRateTypes>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>Ab62GYARtqWE8wJFv6Pd8g==</req:SessionTicket>
            <sch:ProjectIdentity>
               <com:ProjectCode>P001607-001</com:ProjectCode>
            </sch:ProjectIdentity>
            <sch:ProjectRateTypes>
               <com:PwsProjectRateTypeDetail>
                  <com:ProjectRateTypeUid>1152921504607446462</com:ProjectRateTypeUid>
                  <com:ProjectRateTypeName>Regular</com:ProjectRateTypeName>
                  <com:BillingAdjustedHourlyRate>100</com:BillingAdjustedHourlyRate>
                  <com:ContractHourlyRate>100</com:ContractHourlyRate>
                  <com:SortOrder>1</com:SortOrder>
                  <com:StandardRateTypeIdentity>
                     <com:StandardRateTypeName>Regular</com:StandardRateTypeName>
                  </com:StandardRateTypeIdentity>
                  <com:NewExternalSystemIdentifier>1</com:NewExternalSystemIdentifier>
               </com:PwsProjectRateTypeDetail>
               <com:PwsProjectRateTypeDetail>
                  <com:ProjectRateTypeUid>1152921504607446463</com:ProjectRateTypeUid>
                  <com:ProjectRateTypeName>Not Chargeable</com:ProjectRateTypeName>
                  <com:BillingAdjustedHourlyRate>0</com:BillingAdjustedHourlyRate>
                  <com:ContractHourlyRate>0</com:ContractHourlyRate>
                  <com:SortOrder>2</com:SortOrder>
                  <com:StandardRateTypeIdentity>
                     <com:StandardRateTypeName>Not Chargeable</com:StandardRateTypeName>
                  </com:StandardRateTypeIdentity>
                  <com:NewExternalSystemIdentifier>2</com:NewExternalSystemIdentifier>
               </com:PwsProjectRateTypeDetail>
               <com:PwsProjectRateTypeDetail>
                  <com:ProjectRateTypeName>Special Rate</com:ProjectRateTypeName>
                  <com:BillingAdjustedHourlyRate>150</com:BillingAdjustedHourlyRate>
                  <com:ContractHourlyRate>150</com:ContractHourlyRate>
                  <com:SortOrder>3</com:SortOrder>
                  <com:StandardRateTypeIdentity>
                     <com:StandardRateTypeName>Special Rate</com:StandardRateTypeName>
                  </com:StandardRateTypeIdentity>
                  <com:NewExternalSystemIdentifier>3</com:NewExternalSystemIdentifier>
               </com:PwsProjectRateTypeDetail>
            </sch:ProjectRateTypes>
         </pws:serviceRequest>
      </pws:PwsSaveProjectRateTypes>
   </soapenv:Body>
</soapenv:Envelope>



Response Format


PwsSaveProjectRateTypes Response

Response Elements

Element

Data Type

Description

Messages

PwsMessage[]

 The web service response status and message. Click here for more information.

ResponseId

Int32

 Click here for more information.

RequestStatus

RequestStatus

 Click here for more information

ServerTimestampUtc

DateTime

 Click here for more information.

RateTaskTimestamp

String

This is an optimistic locking timestamp that, if provided on update request, will cause the request to fail when the timestamp stored in the database does not match the provided value.

StolenLocks

PwsEntityLockSummary

This structure contains information about the locks that were stolen in order to complete this request, Will be included only when LocksToSteal is specified in the request.

Response Usage Example(s)


PwsSaveProjectRateTypesResponse
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsSaveProjectRateTypesResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsSaveProjectRateTypesResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/Scheduling/" 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/">2023-09-07T20:03:28.35366Z</ServerTimestampUtc>
            <a:RateTaskTimestamp>AAAAADFChm4=</a:RateTaskTimestamp>
            <a:StolenLocks i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
         </PwsSaveProjectRateTypesResult>
      </PwsSaveProjectRateTypesResponse>
   </s:Body>
</s:Envelope>


PwsSaveProjectRateTypes - Common Errors and Warnings

ErrorNumberErrorCodeErrorText
64616DuplicateEntityInXmlDuplicate PwsProjectRateType entity found in input XML.
54701ProjectRateTypeReferencedByTaskTypeThe project rate type <project-rate-type-name> cannot be deleted because there is at least one project task type that references it.
54784PermissionDeniedToUpdateProjectRateTypeYou do not have appropriate permission to update this project rate type.
54785StandardRateTypeInactiveThe specified standard rate type is inactive.
54787ProjectRateTypeNameInUseThe specified project rate type name is already in use by a different project rate type on this project.
54788ProjectRateTypeExternalSystemIdentifierInUseThe specified project rate type external system identifier is already in use by a different project rate type. External system identifiers must be globally unique.
54884ProjectRateTypeReferencedByBaselineThe project rate type <project-rate-type-name> cannot be deleted because it is referenced by one or more baselines.
54731ProjectRateTypeReferencedByInvoiceThe project rate type <project-rate-type-name> cannot be deleted because it is referenced by at least one invoice.
54761ProjectRateTypeReferencedByTimecardThe project rate type <project-rate-type-name> cannot be deleted because it is referenced by at least one time card.