Document history
Learn how to review the history of changes made to an invoice, quote, or credit note.
Overview
Monite keeps a history of changes made to all accounts receivable documents - invoices, quotes, and credit notes - from document creation to the final status. This provides entities with an overview of how a document has evolved over time.
The change history includes:
- all revisions made to the document,
- who made the change and when,
- status transitions,
- emails sent to the clients and the email addresses of the recipients,
- payments made towards an invoice.
To access a document’s history, call GET /receivables/{receivable_id}/history
. You can filter the history by a date range or the event_type
.
The history consists of a list of timestamped events that have occurred since the document was created. The event_data
structure varies based on the event_type
. For a description of available data fields and query parameters, see the endpoint description.
Roles and permissions
To access a receivable’s change history using an entity user token,
this user must have a role with the receivables.read
permission.
If the permission type is allowed_for_own
(rather than allowed
), the user can access the change history only for documents that they themselves created, but the returned history still includes the changes made to their documents by other users.
If a partner-level token is used, no special permissions are needed.
Event types
Change history currently includes the following events:
created_at
timestamp.based_on_receivable_created
Applies to: invoices, quotes
In invoice history, this event means that a credit note was created for this invoice.
In quote history, this event means that an invoice was created from this quote.
The event_data
object contains the type and ID of the newly created document. In the following example, a credit note with ID 0d51…
was created for an invoice with ID 628e…
:
mail_sent
Applies to: all receivables
This event indicates that an invoice, quote, or credit note was sent via email. This includes:
- Successful calls to
POST /receivables/{receivable_id}/send
. - Automated scheduled emails containing recurring invoices.
The event_data
object contains a list of email recipients and the email sending status per recipient and overall. The mail_id
is the ID of the email sending operation that can be used to get the same information from GET /receivables/{receivable_id}/mails/{mail_id}
.
payment_received
Applies to: invoices
This event indicates that a full or partial invoice payment has been received. This includes:
- payments made by counterparts via Monite payment links and embeddable payment component,
- payments recorded by entity users via:
The event_data
object contains the payment amount, the remaining amount due for the given invoice, and the payment comment (the latter available only for payments recorded via /mark_as_paid
and /mark_as_partially_paid
).
receivable_updated
Applies to: all receivables
This event is recorded when a receivable is successfully updated via PATCH /receivables/{receivable_id}
.
The receivable_updated
events have empty event_data
. Instead, the current_pdf_url
contains a link to the PDF version of the document after the change.
The following changes do not trigger the receivable_updated
event:
- Line items updates via
PUT /receivables/{receivable_id}/line_items
. - Updates made to external linked objects - entity, counterpart, their bank accounts, payment terms, and others - unless followed by a call to
PATCH /receivables/{receivable_id}
. - Status transitions (for example, from
draft
toissued
). They trigger thestatus_changed
event instead.
status_changed
Applies to: all receivables
This event indicates that a document’s status
was changed. The event_data
object contains the old and new statuses of the document. If the status change caused an update of the PDF version of the document, a link to the new PDF is stored in current_pdf_url
.
See invoice statuses, quote statuses, and credit note statuses for the possible status values.