Negative Invoice Lines to Credit Conversion (POST)

Convert a list of invoice lines with a negative amount into a posted credit memo. This conversion is applicable for a single invoice at a time.

Keep these considerations in mind when you use this API.

  • All invoice lines must be related to the same invoice.
  • The invoice line must have a negative amount.
  • The invoice line must not be a previously converted credit memo.
  • The invoice must have the Posted status.
  • The invoice must not have any active settlements such as credit applications.

Special Access Rules 

You need the Credit Memo Operations User permission set to use this API.

Resource 

1/commerce/invoicing/invoices/{invoiceId}/actions/convert-to-credit

Resource Example 

1https://{yourInstance}.salesforce.com/services/data/v68.0/commerce/invoicing/invoices/{3ttxx00000000XtAAI}/actions/convert-to-credit

Available Version 

62.0

HTTP Methods 

POST

Path Parameter for POST 

NameTypeDescriptionRequired or OptionalAvailable Version
invoiceIdStringID of the invoice whose negative invoice lines must be converted into a posted credit memo.Required62.0

Request Body for POST 

JSON Example

1{
2  "invoiceLines": ["5TVxx0000004C92GAE", "5TVxx0000004C93GAE"],
3  "description": "Convert negative invoice lines into credit",
4  "effectiveDate":"2022-05-18"
5  }

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
descriptionStringDescription stamped on the credit memo that’s created after the negative invoice line conversion.Optional62.0
effectiveDateStringDate stamped on the credit memo that’s created after the negative invoice line conversion.Required62.0
invoiceLinesString[]Complete list of the negative invoice lines along with the associated invoice line taxes. The specified negative invoice lines are converted into a posted credit memo.Optional62.0

Response Body for POST 

Convert Negative Invoice Lines