Skip to main content
Skip table of contents

Document structure

In Circularo a “document” is a collection of metadata and the file itself (binary file). The file is uploaded separately and metadata are assigned when creating a document.

So in order to create the document, file needs to be uploaded first.

Below is an explanation of some of the values in the document object that can be useful to know about for next chapters in this guide.
Please note that these are only some of the properties and there are a lot of other that are present in document object. If you wish to explain some particular ones, please contact our support team.

To get document data use enpoint below. More info can be found in Retrieve the document

JS
GET /documents/{id}

documentTitle - name of the pdf file

pdfFile - an object containing data of the uploaded file itself (ref - Create file)

signFields - predefined sign fields and annotations in the document

signatureComponents - already placed signatures and annotations to the document

position - position of the sign field on the X,Y axis on the page

workflow - an object containing activity data performed on the document

workflow.history - history of the actions with the documents

workflow.shareStateName - current signing status

Document search

Below are some of the examples of the elasticsearch queries used for searching documents in the database.

All queries are using the endpoint

JS
POST /search

Search document with the name

JS
{
  "query": {
    "match": {
      "name": "myDocument.pdf"
    }
  }
}

Get documents in specific state created after specified date (in this case all completed documents)

JS
{
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "createDate": {
              "gte": "2020-12-31T23:59:59.999Z" // Date from
            }
          }
        },
        {
          "nested": {
            "path": "workflow",
            "query": {
              "terms": {
                "workflow.shareStateName": ["completed"] //other options: "inprogress", "rejected", "expired", "cancelled"
              }
            }
          }
        }
      ]
    }
  }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.