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 (PwsClientRefPwsExpenseDocumentRef) of  of the client expense document that has been inserted or updated. The caller can optionally request that the full client expense document detail (PwsClientElementPwsExpenseDocumentElement) 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 documentshould be notified of the submission. Applies only when submitting the 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 documentsdocument.


ExcludeCreditCostCardsFlag

Boolean

No

true

If set to 'true', credit cost cards will be excluded from the expense document in the response. Applies only when FullDetailFlag is 'true'.

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: YesNo


The unique keys used to identify the expense document. This may be used when submitting an expense document without making any changes.


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 if they are not found.

false

ResourceIdentity

PwsResourceRefOn Insert: Yes (for expense documents only)

On Update: No

The resource associated with the expense documentNo


*** this field has been deprecated ***


RetrieveCostCardsFlag

Boolean

No

false

If set to 'true', the cost cards on the referenced expense document will be included in the response. Applies only when FullDetailFlag is 'true'.

true

RetrieveReceiptsFlag

Boolean

No

false

If set to 'true', the receipts on the referenced expense document will be included in the response. Applies only when FullDetailFlag is 'true'.

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 documentidentified in ApproverIdentities.

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 after any changes have been saved.

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 to PwsGetExpenseDocument (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 for any failed cost card insert inserts or saveupdates.


ExpenseDocument

PwsExpenseDocumentElement

The details of the expense document (less any subordinate entities)NULL if FullDetailFlag is 'false').


ExpenseDocumentIdentity

PwsExpenseDocumentRef

The key fields of the expense document.


ReceiptResults

PwsSaveReceiptResult[]

The error details of a for any failed receipt insert inserts or saveupdates.


SaveSucceededFlag

Boolean

If set to 'true', the expense document was successfully saved. The service may successfully save changes to an expense document, but fail during submission.

true

Response Usage Example(s)

...