ReplaceInvoice is used to replace the complete invoice, meaning that you can add or remove invoice rows, change the number of articles or the price. 

Please note that all values are replaced when using this function, if you only want to update the price on one specific item, you do need to add all the other invoice rows as well.

This request can only be done on pending invoices and not when they've been activated. 

NOTE: ReplaceInvoice cannot be used to increase the amount above the original amount on the payment types Card and Direct Payment (Collector Checkout).

This method is available in the following countries:  
    * * *

*Positive adjustments are not available in the non nordic countries, meaning an invoice's amount can only be changed to a lower amount or to the original invoice amount for AT, DE and NL. If a ReplaceInvoice is used to lower an invoice in any of these countries. it's not possible to raise the amount again.

Input Parameters:

Field Nillable Max Type Description
Username false   String The username used to authorize the request.
Password false   String The password used to authorize the request.
StoreId true   int The Partner identification number, use to uniquely identify a partner for a country.
CorrelationId true   String Correlation ID sent back in the response.
CountryCode false 2 String The country code. Country code must follow ISO 3166-1-alpha-2.
InvoiceNo false   String The invoice number of a “pending” invoice to be changed.
InvoiceRows false   InvoiceRow The articles that should replace the current invoice’s rows.

 Output Parameters:

Field Type Description
CorrelationId String Correlation ID from the request if any.
AvailableReservationAmount Decimal The current available reservation amount. If no credit reservation is done, 0 will be returned.
TotalAmount Decimal The total amount to pay for the invoice.
InvoiceStatus int The status of the invoice.