Update

Edits a saved credit memo and returns its full payload. Only the fields you send change. A canceled memo can't be edited.

Body

FieldTypeDefaultDescription
increment_idstringnoneRequired. Credit memo increment id
creditmemo_reason_codestringnoneThe reason, by its code from Order Settings > Credit Memos. An empty string clears the reason
creditmemo_reasonstringnoneThe reason by its label, instead of the code
notestring""Kept in the memo's history with the change. It is never emailed
notify_customerboolfalseSend the credit memo update email
totalsnumbernoneThe memo's typed totals, in base currency. Which ones depends on the memo's type, see below
itemsarraynoneItem memos only, see below

Amount memo (creditmemo_type: 2)

memo_amount, shipping_amount, discount_amount, tax_amount and adjustment_amount. Sending items is rejected.

Item memo (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 note sent alone is saved in the memo's history.
  • A call that changes nothing and sends no note is refused: 400 Nothing to update on the credit memo. With notify_customer: true such a call is not refused: the update email is sent for the memo as it stands, nothing is saved and the answer has changed: 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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
number
string
string
boolean
Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json