post
https://{store}/api/rest/sales2/creditmemo/unapply
Removes one applied credit. Its credit transaction is voided, every invoice it paid reopens for that amount, and the credit returns to the credit memos it was drawn from.
The credit is named by the increment id of its credit transaction, not by a credit memo number: credit_transaction.increment_id in the Apply to an invoice answer.
Body
| Field | Type | Description |
|---|---|---|
credit_increment_id | string | Required. Increment id of the credit transaction to remove |
reason | string | Required. Kept in the history |
Rules
- A credit that is no longer applied, or that was not applied from a credit memo, is refused with a
400. - An unknown
credit_increment_idanswers404. - On a store synced to QuickBooks or NetSuite the removal is sent there first. If that system refuses it, nothing is saved and its reason comes back as a
400. - With a staff user's token, the user's role must allow removing credit; otherwise the call answers
403 You do not have permission to remove credit.
Response
| Field | Description |
|---|---|
credit_transaction | { id, increment_id } of the credit transaction removed |
bills[] | { bill_id, increment_id, amount_removed, remaining_to_pay } for each invoice it had paid |
creditmemos[] | { creditmemo_id, increment_id, amount_returned, remaining_credit, state } for each credit memo the credit went back to. state is the state's name, e.g. Unapplied |
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
