Delete a note or an attachment

Removes a comment from a record's comments section, with every file attached to it, or removes a single file from a comment and leaves the comment itself in place. Operators use it to take back a comment they wrote, or to drop a file they attached to one while editing it. Both are immediate and cannot be undone.

Where you can do this

  • Merchant View: Comments (Delete Comment)
  • Merchant View: Comments (x on the attachment)

Before you start

  • The note exists.
  • To delete an attachment, the attachment is one of those the note reports.

Inputs

Both routes take their inputs from the path; neither reads a request body.

Rules

Checked by the API means Shuttle refuses the request however it is sent; a screen name means only that screen refuses it, and a direct API call would be accepted.

RuleChecked byWhat you see
The note must exist. The two routes check it at different points and so report the same code with different wordingThe APINOT_FOUND "Object not found: note " on the note route; NOT_FOUND "Note not found" on the attachment route

What happens

  • Deleting a comment removes it from the record's comments for everyone, together with every file attached to it. The reply is 204 with no body, and there is no way back: the files are destroyed and the comment cannot be restored to the record.
  • Deleting an attachment removes that one file from the comment and leaves the comment, its text and its other files as they were. The reply is 204 with no body. In Merchant View the removal is only marked while editing and is sent when the comment is saved.
  • Any link already shared to a removed file stops working, including a public comment's public_url when the file removed was the first attachment on it.
  • Nothing is announced: no webhook, no email or SMS, and no entry in the record's history. A comment on a contract raises CONTRACT.NOTE when it is written and again when it is edited, but nothing when it is deleted, so an integration that reacted to the comment is never told it has gone.
  • A deleted comment is still returned by a fetch of the note by its own id, with its attachments still listed although their files have been destroyed. Only the record's comments stop showing it.

Who can do this

  • Roles: Admin and Support. Support cannot delete its own contract comments in Merchant View; see Rules.
  • Admin app: option comments shows the comments section; Delete is offered on the signed-in user's own comments only, on the contract screen only with payment_contract, and on the terminal batch screens only while the batch is open.

Related


Did this page help you?