PwsSaveInvoice

Overview


This web service can be used to save changes to an existing web invoice. Use PwsCreateInvoice to create a new web invoice. The caller can optionally request that the full invoice detail PwsInvoiceElement be included in the response.

Note that this service will update web invoices only, and cannot be used to update Management Portal invoices.

Request Format


PwsSaveInvoiceRq
  • PwsSaveInvoiceRq
    • RequestId: Int32
    • SessionTicket: String
    • AddCommentsToInvoiceMessagesFlag: Boolean
    • AddressClearFlag: Boolean
    • AppliedPrepaidAmountsClearFlag: Boolean
    • BillingInstructionsClearFlag: Boolean
    • ClientMessageClearFlag: Boolean
    • FinanceApprovalStatus: String
    • FullDetailFlag: Boolean
    • IncludeAdjustmentHistoryFlag: Boolean
    • IncludeFullAdjustmentHistoryFlag: Boolean
    • Invoice: PwsInvoiceDetail
    • InvoiceDateClearFlag: Boolean
    • InvoiceEmailRecipientsClearFlag: Boolean
    • InvoiceMessagesClearFlag: Boolean
    • InvoiceTaxesClearFlag: Boolean
    • LocksToSteal: PwsEntityLockSummary[]
    • ManagementApprovalStatus: String
    • NewInvoiceMessages: String
    • NotifyFinanceTeamFlag: Boolean
    • NotifyManagementTeamFlag: Boolean
    • NotifyPmTeamFlag: Boolean
    • OverrideAccountingPeriodClearFlag: Boolean
    • OverrideCapExceededWarningFlag: Boolean
    • ProjectManagerApprovalStatus: String
    • ProjectorLockSetId: Int32
    • PurchaseOrderNumberClearFlag: Boolean

Request Elements

Element

Data Type

Required?

Default

Description

RequestId

Int32



Boolean

SessionTicket

String



Boolean

AddCommentsToInvoiceMessagesFlag

Boolean

No

false

True to prepend comments (NewInvoiceMessages) to invoice messages

AddressClearFlag

Boolean

No

false

True to null out address (if false, address is left as is if all address fields are null in PwsInvoiceDetail structure

AppliedPrepaidAmountsClearFlag

Boolean

No

false

True to null out applied prepaid amounts (if false, applied prepaid amounts are left as is if it not specified in PwsInvoiceDetail structure.

BillingInstructionsClearFlag

Boolean

No

false

True to null out billing instructions (if false, billing instructions are left as is if it null in PwsInvoiceDetail structure.

ClientMessageClearFlag

Boolean

No

false

True to null out client message (if false, client message is left as is if it is null in PwsInvoiceDetail

FinanceApprovalStatus

String (1)

No


A to set to approved, U to set to unapproved, null to leave as is

FullDetailFlag

Boolean

No

false

True to include the full details of the invoice in the response

IncludeAdjustmentHistoryFlag

Boolean

No

false

If FullDetailsFlag is set, true to include adjustment history in invoice detail.

IncludeFullAdjustmentHistoryFlag

Boolean

No

false

If FullDetailsFlag is set and IncludeAdjustmentHistoryFlag is set, true to include full card breakdown with each adjustment history record.

Invoice

PwsInvoiceDetail

Yes


Invoice to be saved

InvoiceDateClearFlag

Boolean

No

false

True to null out invoice date (if false, invoice date is left as is if it is null in PwsInvoiceDetail structure.

InvoiceEmailRecipientsClearFlag

Boolean

No

false

True to null out invoice email recipients (if false, invoice email recipients are left as is if it not specified in PwsInvoiceDetail structure.

InvoiceMessagesClearFlag

Boolean

No

false

True to null out invoice messages (if false, invoice messages are left as is if it is null in PwsInvoiceDetail structure.

InvoiceTaxesClearFlag

Boolean

No

false

True to null out invoice taxes (if false, invoice taxes are left as is if not specified in PwsInvoiceDetail structure.

LocksToSteal

PwsEntityLockSummary[]

No


If stealing existing locks, specify lock holders from PwsFault response

ManagementApprovalStatus

String (1)

No


A to set to approved, U to set to unapproved, null to leave as is

NewInvoiceMessages

String (1000)

No


Invoice messages to include in workflow email. May also be added to invoice messages for the new invoice.

NotifyFinanceTeamFlag

Boolean

No


True to send an e-mail to the finance team response for finance approval of invoice upon update.

NotifyManagementTeamFlag

Boolean

No


True to send an e-mail to the management team response for management approval of invoice upon update.

NotifyPmTeamFlag

Boolean

No


True to send an e-mail to the PM team response for project manager approval of invoice upon update.

OverrideAccountingPeriodClearFlag

Boolean

No

false

True to null out override accounting period (if false, override accounting period is left as is if it is null in PwsInvoiceDetail structure.

OverrideCapExceededWarningFlag

Boolean

No

false

True to override cap exceeded warning and allow invoice to be updated anyway

ProjectManagerApprovalStatus

String (1)

No


A to set to approved, U to set to unapproved, null to leave as is

ProjectorLockSetId

Int32

No


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

PurchaseOrderNumberClearFlag

Boolean

No

false

True to null out purchase order number (if false, purchase order number is left as is if it is null in PwsInvoiceDetail structure

Request Usage Example(s)


Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:bil="http://projectorpsa.com/DataContracts/Shared/Billing/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveInvoice>
         <pws:serviceRequest>
            <req:SessionTicket>AT0Wkw45/5xiaJ8It3xxkA==</req:SessionTicket>
            <bil:FinanceApprovalStatus>A</bil:FinanceApprovalStatus>
            <bil:Invoice>
               <com:InvoiceNumber>DRAFT00763</com:InvoiceNumber>
               <com:ClientMessage>Please pay by 2023-07-18.  Thank you for your cooperation.</com:ClientMessage>
               <com:ContractLineItems>
                  <com:PwsInvoiceContractLineItem>
                     <com:AppliedPrepaidAmount>0</com:AppliedPrepaidAmount>
                     <com:ContractLineItemIdentity>
                        <com:ContractLineItemCode>P001670-CL1</com:ContractLineItemCode>
                     </com:ContractLineItemIdentity>
                  </com:PwsInvoiceContractLineItem>
               </com:ContractLineItems>
               <com:PurchaseOrderNumber>PO-WS-1</com:PurchaseOrderNumber>
            </bil:Invoice>
            <bil:NewInvoiceMessages>Invoice Message #1</bil:NewInvoiceMessages>
            <bil:NotifyFinanceTeamFlag>true</bil:NotifyFinanceTeamFlag>
            <bil:NotifyManagementTeamFlag>true</bil:NotifyManagementTeamFlag>
         </pws:serviceRequest>
      </pws:PwsSaveInvoice>
   </soapenv:Body>
</soapenv:Envelope>


Response Format


PwsGetClientRs
  • PwsSaveInvoiceRs


Response Elements


ElementData TypeDescriptionSample Data
MessagesPwsMessage[]

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


ResponseIdInt32Click here for more information1
StatusRequestStatusClick here for more informationOk
ServerTimestampUtcDateTimeClick here for more information
2018-01-17T19:38:49.0775059Z
InvoiceIdentityPwsInvoiceRefThe identity of the updated invoice.
InvoicePwsInvoiceElementThe complete details If FullDetailFlag is specified on request.
ExceededContractsPwsExceededContractDetail[]Details about exceeded contracts (i.e. saving of invoice would cause cap to be exceeded on NTE contracts). To save invoice anyways, re-issue request with OverrideCapExceededWarningFlag set to true.
InvoiceTimestampStringThis is an optimistic locking timestamp for the updated invoice.
StolenLocksPwsEntityLockSummaryThis 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)


Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsSaveInvoiceResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsSaveInvoiceResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/Billing/" 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/">0</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2022-07-18T16:28:17.5822748Z</ServerTimestampUtc>
            <a:ExceededContracts i:nil="true"/>
            <a:Invoice i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <a:InvoiceIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:InvoiceId i:nil="true"/>
               <b:InvoiceNumber>DRAFT00763</b:InvoiceNumber>
               <b:InvoiceUid i:nil="true"/>
            </a:InvoiceIdentity>
            <a:InvoiceTimestamp>AAAAAB5a1X4=</a:InvoiceTimestamp>
            <a:StolenLocks i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
         </PwsSaveInvoiceResult>
      </PwsSaveInvoiceResponse>
   </s:Body>
</s:Envelope>

PwsSaveInvoice - Common Errors and Warnings

ErrorNumberErrorCodeErrorText
10126InvalidEnumerationValueSpecifiedAn invalid value was specified for FinanceApprovalStatus. Valid values are A, U.
68263NoManagementApprovalRequiredInvoice ... does not require management approval.