Get Comparison

Return a comparison's redline once it is ready.

Returns the comparison POST /v1/compare started, by comparison_id, its redline as file in each format asked for: docx (Word tracked changes, the default), pdf, pdf_changed_pages_only, md (its listing: the text with the changes marked), json, or html; a PowerPoint comparison offers pptx and pdf, an Excel comparison xlsx. To show the user the redline, ask for pdf; ask for docx only when the user's own words name Word, .docx or tracked changes, or after they have seen the PDF and ask for it. A document's type alone is not a reason to. A person sees the PDF, or the html redline where the view must be interactive; md is for a model to read, and json for code to act on, never to draw the redline from. While formats are pending, status is processing: call again with the same arguments until it is ready. Status failed is terminal for the formats in file.failed_formats, or for the whole comparison when error is present. Each file.downloads[] entry's url serves the file directly; the links expire after one hour.

"Compare," "redline" or "diff" by themselves mean produce the file, not explain it.

When the user asks what changed, to explain, summarize or answer a question about the changes, read the redline's listing: the file.downloads[] entry of format md (ask for format=md), or GET /v1/files/{file_id}?format=md by file.file_id to search it. Its <ins>, <del>, <moved-from> and <moved-to> elements are the exact tracked-change set, each naming its revision, and the <revision/> lines at its end list every revision with its type, author and date; its header says what each tag means.

get/v1/compare/{comparison_id}

Request

  • Base URL
    https://api.versionstory.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.versionstory.com/v1/compare/{comparison_id}
  • Auth
    HTTP bearer

Path parameters

comparison_idstring required

The comparison_id POST /v1/compare returned.

Query parameters

formatstring[] nullable

docx (default), pdf, pdf_changed_pages_only, md, json, html; one or more. pdf is the document to show a person. docx is the Word file with tracked changes, for a lawyer to review and send on. pdf_changed_pages_only is the pages that changed, for a quick review. md is the text with the changes marked, for a model to read. json is the same as structured data, for code to act on (counting the changes, routing the document, linking a change to a record). It describes the document's structure and changes, not its layout in pages, so never draw the document from it: show the PDF. html is the redline to embed in a page where the view must be interactive. PowerPoint comparisons offer pptx (default) and pdf, Excel comparisons xlsx.

Headers

X-Customer-Idstring nullable

Id of one of your customers (created in the developer dashboard) to attribute this request's credit usage to. Billing and limits stay organization-wide.

Response

Successful Response

comparison_idstring required
redline_file_idstring nullable

Deprecated: use file.file_id, the same id. Absent for a presentation or workbook comparison.

status'processing' | 'ready' | 'failed' required

The comparison's status; file.status is its redline file's.

pending_formatsstring[] nullable

Deprecated: use file.pending_formats. The formats of downloads still being made.

failed_formatsstring[] nullable

Deprecated: use file.failed_formats. The formats of downloads that will never be made.

Changes

No recorded changes to this operation across all 1 revision of this API.