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.
Request
- Base URLhttps://api.versionstory.com (the document declares no server; this is the origin it was published from)
- URLhttps://api.versionstory.com/v1/compare/{comparison_id}
- AuthHTTP bearer
Path parameters
The comparison_id POST /v1/compare returned.
Query parameters
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
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
Changes
No recorded changes to this operation across all 1 revision of this API.