documents

Lookup Elements

Find elements of one version of a document (paragraphs, tables, rows, cells) in its other versions, by id rather than by text. Give the version ({"version_id": version_id}, or its reference as a response gave it) and ids, each the id that version's listing prints for a paragraph, table, row or cell of its body (up to 1000). The answer gives each element's type and its ids in every version (or the versions you list), following the map each version's redline keeps, forward and back: one id, several where it was split, none where it was deleted or in a version made before it was added. With formats (md, json) it also gives the element's content in each version where it has ids, as that version's listing renders it, from its redline with its tracked changes (show_changes, the default; a first version reads clean) or from its file. Use it to carry a reference to a clause, a table or a cell from one version to another, or to read how it changed.

post/v1/documents/{document_id}/elements/lookup

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/documents/{document_id}/elements/lookup
  • Auth
    HTTP bearer

Path parameters

document_idstring required

The Document's document_id, a UUID.

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.

Request body

idsstring[] required

Ids of that version's body paragraphs, tables, rows and cells, as its listing prints them; each is answered once, in the order given.

formatsstring[] nullable

The element's content in each version, as its listing renders it; ids alone without it.

show_changesboolean

Read the content from each version's redline, with its tracked changes (a first version has none, so it reads clean); false reads it from the version's file.

Response

Successful Response

Changes

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