Skip to main content
The viewer is interactive, but sometimes you need a file: something to attach to an email, file against a matter, or send to someone who will not open a link. The exports endpoint turns a completed comparison into a downloadable PDF.
You can only export a comparison that has finished processing. Confirm ready is true and failed is false before creating an export.

Export kinds

Choose what the PDF should contain with the kind parameter.
single_page is the one most people want. It reads as a single reviewable document, in the way a redline does, rather than as two documents side by side. Use combined when the reader needs to see both versions in full.

Creating an export

The response is 201 Created:
As with comparisons, exports are generated asynchronously. The response comes back immediately with ready: false and no url.

Retrieving the finished PDF

Poll the export until it is ready:
When it completes, a url appears:
Download the PDF from that URL.
The download URL is signed and time-limited. Fetch the file promptly rather than storing the URL for later use. If a stored URL has expired, create a new export to get a fresh one.
As with comparisons, ready: true means processing finished, not that it succeeded. Check failed, and read error_message when it is true.

A complete flow

1

Create the comparison

POST /comparisons with both documents. Keep the returned identifier.
2

Wait for the comparison to be ready

Poll GET /comparisons/{identifier} until ready is true. Confirm failed is false.
3

Create the export

POST /exports with the comparison identifier and your chosen kind.
4

Wait for the export to be ready

Poll GET /exports/{identifier} until ready is true.
5

Download the file

Fetch the PDF from the url in the response, promptly.
Note the two separate waits. A common mistake is creating an export immediately after creating a comparison, before the comparison itself has finished.

Creating a comparison

Viewing and sharing results

Handling errors and failures