Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview


This web service inserts or updates a single expense document based on a detailed expense document structure (PwsExpenseDocumentDetail). The service returns the identity (PwsClientRef) of the client that has been inserted or updated. The caller can optionally request that the full client detail (PwsClientElement) be included in the response.

...

Panel
titlePwsSaveExpenseDocument Request
  • PwsSaveExpenseDocument

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No


Click here for more information.


SessionTicket

String

Yes


Click here for more information.

AfzlAZe2idqL1YMlz4UgWg==

AdministratorComments

String (4000)

No


Administrator comments to be stored with the expense document upon save


ApproverIdentities

PwsUserRef[]

No


Projector users who have the ability to approve this expense document


DeleteCostCards

PwsCostCardRef[]

No


Key fields identifying the cost cards that should be deleted from the expense document


DeleteReceipts

PwsReceiptRef[]

No


Key fields identifying the receipts that should be deleted from the expense documents


ExcludeCreditCostCardsFlag

Boolean

No

true

If set to 'true', credit cost cards will be excluded from the expense document

true

ExpenseDocument

PwsExpenseDocumentDetail

On Insert: Yes

On Update: No


The detailed expense document information to be inserted or updated


ExpenseDocumentIdentity

PwsExpenseDocumentRef

On Insert: No

On Update: Yes


The unique keys used to identify the expense document


FullDetailFlag

Boolean

No

false

If set to 'true', include full detailed expense document element in response

true

InsertReceiptsIfNotFoundOnUpdateFlag

Boolean

No

false

If set to 'true' and an existing expense document is being updated, receipts identified in this web service will be inserted

false

ResourceIdentity

PwsResourceRef

On Insert: Yes (for expense documents only)

On Update: No


The resource associated with the expense document


RetrieveCostCardsFlag

Boolean

No

false

If set to 'true', the cost cards on the referenced expense document will be included in the response

true

RetrieveReceiptsFlag

Boolean

No

false

If set to 'true', the receipts on the referenced expense document will be included in the response

true

SaveCostCards

PwsCostCardDetail[]

No


The detailed cost card information for the cost card(s) to be inserted or updated


SaveReceipts

PwsReceiptDetail[]

No


The detailed receipt information for the reciept(s) to be inserted or updated


SendNotificationEmailFlag

Boolean

No

false

If set to 'true', a notification email will be sent to all the users who are able to approve the expense document

true

SubmissionComments

String (4000)

No


The comments that will be sent to the approvers upon submission

Submitted

SubmitFlag

Boolean

No

false

If set to 'true', all the cost cards on the expense document will be submitted

true

UpdateReceiptsIfFoundOnInsertFlag

Boolean

deprecated


** This field has been deprecated **

true

ExpenseDocumentTimestamp

String

No


This is a Base64 encoded timestamp utilized for expense document locking. To protect against overwriting other changes, you may optionally echo back the timestamp returned by a call to PwsSaveExpenseDocument (or a prior call to PwsSaveExpenseDocument). This will cause the request to fail if any change has been made between invocations of PwsGetExpenseDocument and PwsSaveExpenseDocument.


PreserveCostCardStatusFlag

Boolean

deprecated


** This field has been deprecated **


Request Usage Example(s)


Code Block
languagexml
titleExample 01
collapsetrue
<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:PwsSaveExpenseDocument>
         <pws:serviceRequest>
            <req:SessionTicket>AcdrvYuS1YjvT27fonW7Cw==</req:SessionTicket>
            <tim:ExcludeCreditCostCardsFlag>true</tim:ExcludeCreditCostCardsFlag>
            <tim:ExpenseDocument>
               <tim:CashAdvanceReturnAmount>1.00</tim:CashAdvanceReturnAmount>
               <tim:DocumentName>Expense Document A</tim:DocumentName>
               <tim:DocumentType>E</tim:DocumentType>
               <tim:LocationIdentity>
                  <com:LocationName>USA</com:LocationName>
               </tim:LocationIdentity>
               <tim:ResourceIdentity>
                  <com:ResourceReferenceSystemId>E125</com:ResourceReferenceSystemId>
               </tim:ResourceIdentity>
               <tim:VendorIdentity>
                  <com:VendorNumber>Beth Brown</com:VendorNumber>
               </tim:VendorIdentity>
               <tim:Vendor>
                  <com:VendorNumber>Beth Brown</com:VendorNumber>
                  <com:ExpenseReportPayeeFlag>true</com:ExpenseReportPayeeFlag>
                  <com:InactiveFlag>false</com:InactiveFlag>
                  <com:ResourceVendorFlag>true</com:ResourceVendorFlag>
                  <com:VendorInvoicePayeeFlag>false</com:VendorInvoicePayeeFlag>
                  <com:SubcontractorInvoicePayeeFlag>false</com:SubcontractorInvoicePayeeFlag>
               </tim:Vendor>
               <tim:SubcontractorInvoiceReferenceNumberClearFlag>false</tim:SubcontractorInvoiceReferenceNumberClearFlag>
               <tim:VendorInvoiceReferenceNumberClearFlag>false</tim:VendorInvoiceReferenceNumberClearFlag>
            </tim:ExpenseDocument>
            <tim:FullDetailFlag>true</tim:FullDetailFlag>
            <tim:InsertReceiptsIfNotFoundOnUpdateFlag>false</tim:InsertReceiptsIfNotFoundOnUpdateFlag>
            <tim:ResourceIdentity>
               <com:ResourceReferenceSystemId>E125</com:ResourceReferenceSystemId>
            </tim:ResourceIdentity>
            <tim:RetrieveCostCardsFlag>false</tim:RetrieveCostCardsFlag>
            <tim:RetrieveReceiptsFlag>false</tim:RetrieveReceiptsFlag>
            <tim:SaveCostCards>
               <tim:PwsCostCardDetail>
                  <tim:Description>Breakfast</tim:Description>
                  <tim:DescriptionClearFlag>false</tim:DescriptionClearFlag>
                  <tim:ExpenseTypeIdentity>
                     <com:ExpenseTypeName>Meals</com:ExpenseTypeName>
                  </tim:ExpenseTypeIdentity>
                  <tim:IncurredAmount>7.99</tim:IncurredAmount>
                  <tim:IncurredDate>2018-02-06T00:00:00.000Z</tim:IncurredDate>
                  <tim:IncurredOpsCurrencyIdentity>
                     <com:OpsCurrencyCode>USD</com:OpsCurrencyCode>
                  </tim:IncurredOpsCurrencyIdentity>
                  <tim:IncurredVatAmount>0</tim:IncurredVatAmount>
                  <tim:LocationClearFlag>false</tim:LocationClearFlag>
                  <tim:LocationIdentity>
                     <com:LocationName>USA</com:LocationName>
                  </tim:LocationIdentity>
                  <tim:NonBillableFlag>false</tim:NonBillableFlag>
                  <tim:OverrideClientAmountClearFlag>false</tim:OverrideClientAmountClearFlag>
                  <tim:PayeeVendorClearFlag>false</tim:PayeeVendorClearFlag>
                  <tim:PayeeVendorIdentity>
                     <com:VendorNumber>Beth Brown</com:VendorNumber>
                  </tim:PayeeVendorIdentity>
                  <tim:ProjectIdentity>
                     <com:ProjectCode>P001407-001</com:ProjectCode>
                  </tim:ProjectIdentity>
                  <tim:ResourceClearFlag>false</tim:ResourceClearFlag>
                  <tim:ResourceIdentity>
                     <com:ResourceReferenceSystemId>E125</com:ResourceReferenceSystemId>
                  </tim:ResourceIdentity>
                  <tim:TotalAmountDisbursedCurrency>7.99</tim:TotalAmountDisbursedCurrency>
                  <tim:Udf1ClearFlag>false</tim:Udf1ClearFlag>
                  <tim:Udf2ClearFlag>false</tim:Udf2ClearFlag>
                  <tim:ExternalGroupingIdentifierClearFlag>false</tim:ExternalGroupingIdentifierClearFlag>
               </tim:PwsCostCardDetail>
            </tim:SaveCostCards>
            <tim:SendNotificationEmailFlag>true</tim:SendNotificationEmailFlag>
            <tim:SubmissionComments>Submitted</tim:SubmissionComments>
            <tim:SubmitFlag>true</tim:SubmitFlag>
         </pws:serviceRequest>
      </pws:PwsSaveExpenseDocument>
   </soapenv:Body>
</soapenv:Envelope>

...

Panel
titlePwsSaveExpenseDocument Response

...

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.

0

Status

RequestStatus

Click here for more information.


ServerTimestampUtc

DateTime

Click here for more information.

2018-02-06T17:51:24.722311Z

CostCardResults

PwsSaveCostCardResult[]

The error details of a failed cost card insert or save


ExpenseDocument

PwsExpenseDocumentElement

The details of the expense document (less any subordinate entities)


ExpenseDocumentIdentity

PwsExpenseDocumentRef

The key fields of the expense document


ReceiptResults

PwsSaveReceiptResult[]

The error details of a failed receipt insert or save


SaveSucceededFlag

Boolean

If set to 'true', the expense document was successfully saved

true

...