Apply Credit Action
Apply a credit memo or credit memo line to an invoice or invoice line, respectively.
This action credits the amount of the credit memo or credit memo line to the corresponding invoice or invoice line, reducing both their balances.
This action is available in API version 62.0 and later.
Special Access Rules
The Apply Credit action is available in Enterprise, Developer, and Unlimited Editions where Billing is enabled. To use this action, you need the Credit Memo Operations User permission set.
Supported REST HTTP Methods
URI: /services/data/v68.0/actions/standard/applyCredit
Formats: JSON, XML
HTTP Methods: POST
Authentication: Authorization: Bearer TOKEN
Where TOKEN is a placeholder for your OAuth access token.
Inputs
Input Type Description appliedCreditAmountdouble Required. Credit amount applied to an invoice or invoice line. creditSourceRecordIdstring Required. ID of the credit memo or credit memo line that’s applied to an invoice or invoice line. creditTargetRecordIdstring Required. ID of the invoice or invoice line record that the credit is applied to. descriptionstring Additional details about the credit memo or credit memo line to be applied to an invoice or invoice line. effectiveDatestring Date to use for applying the credit memo to an invoice or invoice line.
Outputs
Output Type Description recordIdstring ID of the credit memo invoice application or credit memo line invoice line record of type Applied that the action created.
Example
POST
This example shows a sample request for the Apply Credit action.
1 {
2 "inputs": [
3 {
4 "appliedCreditAmount": 20,
5 "creditTargetRecordId": "3ttDU00000000iZYAQ",
6 "creditSourceRecordId": "50gDU000000007NYAQ",
7 "description": "Applied credit memo to an invoice",
8 "effectiveDate": "2024-08-27"
9 }
10 ]
11 }
This example shows a sample response for the Apply Credit action.
1 {
2 "actionName": "applyCredit",
3 "errors": null,
4 "invocationId": null,
5 "isSuccess": true,
6 "outputValues": {
7 "recordId": "4sFDU00000000652AA"
8 },
9 "sortOrder": -1,
10 "version": 1
11 }