PwsAdjustCostUnits

Overview


This web service updates the number of units (i.e. miles traveled or units sold) associated with one or more existing cost cards. Updating the quantity of units on cost cards for unit-based expense types will cause the client amount on adjusted cost cards to be recalculated. This entails reversing out any prior adjustments and recalculating the value based on the default markup percentage of the current expense type.

Request Format


PwsAdjustCostUnits Request

PwsAdjustCostDescription

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestIdInt32No
Click here for more information
1
SessionTicket

String

Yes
Click here for more information
AZZLhIFhqIg+w/UlZKyCfg==
AdjustmentCodeIdentityPwsAdjustmentCodeRefNo
This structure represents the unique key fields associated with identifying an adjustment code. 
AdjustmentOrdersPwsCostUnitsAdjustmentOrder [1..100]Yes
This structure represents the fields associated with a cost card unit adjustment.
Explanation

String (1024)

No
An explanation as to why this adjustment was applied.
Change units on cost card

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:tim="http://projectorpsa.com/DataContracts/Shared/TimeAndCost/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsAdjustCostUnits>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>AZZLhIFhqIg+w/UlZKyCfg==</req:SessionTicket>
            <tim:AdjustmentCodeIdentity>
               <com:AdjustmentCodeName>Other</com:AdjustmentCodeName>
               <com:AdjustmentCodeUid>1152921504606858479</com:AdjustmentCodeUid>
            </tim:AdjustmentCodeIdentity>
            <tim:AdjustmentOrders>
               <tim:PwsCostUnitsAdjustmentOrder>
                  <tim:CostCardIdentity>
                     <com:CostCardUid>1152921504614693610</com:CostCardUid>
                  </tim:CostCardIdentity>
                  <tim:NewClientAmount>100</tim:NewClientAmount>
                  <tim:NewDisbursedAmountDisbursedCurrency>100</tim:NewDisbursedAmountDisbursedCurrency>
                  <tim:NewUnits>2</tim:NewUnits>
                  <tim:NewVatAmountDisbursedCurrency>12.75</tim:NewVatAmountDisbursedCurrency>
               </tim:PwsCostUnitsAdjustmentOrder>
            </tim:AdjustmentOrders>
            <tim:Explanation>Change units on cost card</tim:Explanation>
         </pws:serviceRequest>
      </pws:PwsAdjustCostUnits>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsAdjustCostUnits Response

Response Elements


Element

Data Type

Description

Sample Data

MessagesPwsMessage[]

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


ResponseIdInt32Click here for more information
1
StatusRequestStatusClick here for more information
Ok
ServerTimestampUtcDateTimeClick here for more information
2019-11-11T20:04:56.6324809Z
CostCardIdentitiesPwsCostCardRef [1..100]The identities of the cost cards that were updated.

Response Usage Example(s)


Example 01
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsAdjustCostUnitsResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsAdjustCostUnitsResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/TimeAndCost/" 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/">2019-11-11T20:04:56.6324809Z</ServerTimestampUtc>
            <a:CostCardIdentities xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:PwsCostCardRef>
                  <b:CostCardId>7846634</b:CostCardId>
                  <b:CostCardUid>1152921504614693610</b:CostCardUid>
                  <b:ReferenceId i:nil="true"/>
               </b:PwsCostCardRef>
            </a:CostCardIdentities>
         </PwsAdjustCostUnitsResult>
      </PwsAdjustCostUnitsResponse>
   </s:Body>
</s:Envelope>

PwsAdjustCostUnits - Common Errors and Warnings


ErrorNumber

ErrorCode

ErrorText

10111RequiredFieldMissingA required field is missing: NewClientAmount.
10111RequiredFieldMissingA required field is missing: NewDisbursedAmountDisbursedCurrency.
10111RequiredFieldMissingA required field is missing: NewUnits.
10111RequiredFieldMissingA required field is missing: NewVatAmountDisbursedCurrency.
64365OneOrMoreTimeCardsIneligibleForAdjustmentAdjustment cannot be completed because one or more cards has changed or is ineligible for adjustment.