Skip to main content
Compare two revisions of a document

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Path Parameters

id
string
required

Identifier of the document whose revisions are being compared.

Minimum string length: 1
Pattern: ^[A-Za-z0-9_-]+$
Example:

"a0d01c9d-f72f-4c57-af11-e26bda19cc59"

Query Parameters

base
integer
required

Revision to compare from - the one the changes are reported against, normally the older of the two.

Required range: x >= 0
Example:

2

compare
integer
required

Revision to compare to. What it has and the base has not is reported as added, and the other way round as removed.

Required range: x >= 0
Example:

3

Response

Returns the differences, grouped by the kind of field they belong to.

arrays
object

Fields holding several values at once, keyed by field name. Each one is reported as three lists - deleted, added and notChanged - rather than as a text difference.

checkboxes
object

Tick-box fields, keyed by field name, reported the same way as arrays: which options were cleared, which were ticked, and which stayed as they were.

dateRanges
object

Period fields, keyed by field name. Each one carries a startDate and an endDate, both reported the same way as an entry of dates, plus a flag telling whether either end moved.

dates
object

Date fields, keyed by field name. Each one carries the value on both sides and whether the two differ.

fields
object

Text and number fields, keyed by field name. Each one is a list of pieces making up the text, every piece marked as inserted, deleted or unchanged, so a client can render the two sides against each other - text is broken up word by word and numbers line by line.

html
object

Rich-text fields, keyed by field name, each holding the two bodies already merged into one piece of HTML with the insertions and deletions marked up in it.