Edits a saved credit memo and returns its full payload. Only the fields you send change. A canceled memo can't be edited.
Body
| Field | Type | Default | Description |
|---|---|---|---|
increment_id | string | none | Required. Credit memo increment id |
creditmemo_reason_code | string | none | The reason, by its code from Order Settings > Credit Memos. An empty string clears the reason |
creditmemo_reason | string | none | The reason by its label, instead of the code |
note | string | "" | Kept in the memo's history with the change. It is never emailed |
notify_customer | bool | false | Send the credit memo update email |
| totals | number | none | The memo's typed totals, in base currency. Which ones depends on the memo's type, see below |
items | array | none | Item memos only, see below |
Amount memo (creditmemo_type: 2)
creditmemo_type: 2)memo_amount, shipping_amount, discount_amount, tax_amount and adjustment_amount. Sending items is rejected.
Item memo (creditmemo_type: 1)
creditmemo_type: 1)items[] is the memo's whole line set, in the same shape as on Create (from invoice lines). The rows you send replace the memo's lines, so a line you leave out is removed. A row without custom_price keeps the price its line has.
shipping_amount, discount_amount, tax_amount, fee_amount, payment_surcharge_amount and adjustment_amount apply only together with items.
Rules
- The new total can't go below what the memo has already applied, refunded, written off or holds for a checkout in progress.
- The lines of a fully applied memo can't change until its applied credit is removed, and those of a fully written-off memo until the write-off is reversed.
- A memo that is open for editing in the admin is refused:
400 This Credit Memo is currently locked and cannot be edited. - A
notesent alone is saved in the memo's history. - A call that changes nothing and sends no
noteis refused:400 Nothing to update on the credit memo.Withnotify_customer: truesuch a call is not refused: the update email is sent for the memo as it stands, nothing is saved and the answer haschanged: false. - A saved memo is a document of its own. A line the memo already has keeps its saved name, price, discount and tax when the memo is edited, whatever its invoice reads today. A changed quantity takes the line's own saved discount and tax per unit.
- A memo already synced to QuickBooks or NetSuite is changed there first. If that system refuses the change, nothing is saved and its reason comes back as a
400. - With a staff user's token, changing totals or lines needs the role's permission to edit credit memo amounts (amount memo) or items (item memo); otherwise the call answers
403. Changing only the reason needs no permission.
Response
{ success, changed, creditmemo, notify_customer }
changed is false when the call saved nothing and only sent the update email, true otherwise.
Variant: Update (item lines)
Changes the lines of an Items memo. items[] is the whole line set: here the memo's one line goes from 2 units to 1. A line left out of items[] is removed from the memo.
See Update for the full field reference and the rules.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
