Skip to main content
Skip table of contents

Create folder, move documents and dowload folder

Introduction

This scenario aims to show Circularo’s ability as a document management platform. Documents can be stored in folders and subfolders as well as downloaded altogether.

Lets assume that there are some completed documents that we would like to have in one place. We will create a folder “Completed documents”, move the documents there and download the whole folder into local storage.

Notes:

  • after download the documents stay in Circularo, if you would like to remove them you need to manually delete them

  • Please take into account that Circularo will not automatically upload document to your remote storage. The integrations need to download the documents themselves

Step 1 - Create folder

We will follow the same instruction as in Getting started section.

Read more about folder creation - Create folder

Endpoint

CODE
POST /folders

Request

JSON
POST /folders?token=TBK0YuTqBvU9tJPvb0rXd95S6LLtgMwXBahqiToymUaF1LpsJUX6Rul8GGTCAGFT

Content-Type: application/json

{
  "name": "Completed Documents",
  "isShared": false
}

Response

Note following properties in response object:

  • folderId - In response object at position id.

    • It may have value of da397c93-3eb3-4b02-b2bf-190d94c459bc.

Step 2 - Move documents into folder

Now that we have a folder created and its ID, we can move our completed documents inside.

Endpoint

CODE
PUT /folders/move

Request

JSON
PUT /folders/move?token=TBK0YuTqBvU9tJPvb0rXd95S6LLtgMwXBahqiToymUaF1LpsJUX6Rul8GGTCAGFT

Content-Type: application/json

{
  "docs": [
    {
      "id": "de100c01-514e-46e5-b27e-6a6b4b1d4e68"  //documentId that you want to move
    }
  ],
  "folderId": "da397c93-3eb3-4b02-b2bf-190d94c459bc",  //folder that we are moving document into
  "isShared": false,  //private folder, true = shared folder
  "rightsMode": "add"
}

Step 3 - Download folder

Now that we have all documents moved we can download the folder to our storage.

Endpoint

CODE
POST /export

Request

JSON
POST /export?token=TBK0YuTqBvU9tJPvb0rXd95S6LLtgMwXBahqiToymUaF1LpsJUX6Rul8GGTCAGFT

Content-Type: application/json

{
  "exporterName": "folder",  //we are exporting a folder
  "options": {
    "documentIds": [
      "da397c93-3eb3-4b02-b2bf-190d94c459bc"  //array of IDs that we want to export, in this case one folder
    ]
  },
  "query": {}
}

Zip file including the folder with documents.

Conclusion

As you can see document management in Circularo is quite easy.

Automate this scenario

If you would like this process automated there is an option to set up a webhook that would alert you any time document is completed. Then Step 2 would be triggered so all completed documents are automatically moved into intended folder.

As a final step there can be a scheduled worker that downloads this folder to your storage once a day (for example).

JavaScript errors detected

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

If this problem persists, please contact our support.