Download multi-document files
Circularo REST API example
Get information about already existing multi-document and download its main file and source files.
Step 1 - Sign in
Sign user in.
Endpoint
POST - /login
Example
/login
Content-Type: application/json
{
"name": "mary.griffin@circularo.com",
"password": "#32Password1!",
"tenant": "default"
}
Response
Note following properties in response object:
- token - In response object at position ‘token‘. It may have value of “WWWEjUVj7RtakPp3tZ1vIr88Ounj9M8ghMBRoaA6N5PSYcT4LHWD6nVokEsSxvIF“.
Step 2 - Retrieve document
Retrieve document information.
Endpoint
GET - /documents/:documentId
Example
/documents/f97fb6c7-5191-4c65-b3e4-02fc959eb73c?token=WWWEjUVj7RtakPp3tZ1vIr88Ounj9M8ghMBRoaA6N5PSYcT4LHWD6nVokEsSxvIF
Response
Note following properties in response object:
- documentVersion - In response object at position ‘results[0]._version‘. It may have value of 4.
- joinedFile - In response object at position ‘results[0].pdfFile.content‘. It may have value of “wrQyGnOpVlwHh8aesjS3jOoZ1As4zVfKKdlM6jFQdOPXzuH931irwCnt37ZnxFt1“.
- sourceFile1 - In response object at position ‘results[0].pdfFile.merge[0].hash‘. It may have value of “DxURc4bNixtQUXf632Qb2NrGHyeq763DU7G4Mjo5uZbw2P0YoAKRUVy8glF9MFNq“.
- sourceFile2 - In response object at position ‘results[0].pdfFile.merge[1].hash‘. It may have value of “GBzrasdsVbcawD4QXkoPjr0iVAAnc4usIfg3jupVU36dwPb7YBuYgDKkQGmNTPTn“.
Returned object contains information about the document.
If any of following endpoint calls will require document version and fails with status code ‘409 - Version mismatch’, please call this endpoint again to receive updated document version. There may be some background tasks that change document version after it is created.
Step 3 - Download main file
Downloads document main file.
Endpoint
GET - /files/loadFile/hash/:hash
Example
/files/loadFile/hash/wrQyGnOpVlwHh8aesjS3jOoZ1As4zVfKKdlM6jFQdOPXzuH931irwCnt37ZnxFt1?token=WWWEjUVj7RtakPp3tZ1vIr88Ounj9M8ghMBRoaA6N5PSYcT4LHWD6nVokEsSxvIF
This endpoint now returns the file.
Step 4 - Download first source file
Downloads document first source file.
Endpoint
GET - /files/loadFile/hash/:hash
Example
/files/loadFile/hash/DxURc4bNixtQUXf632Qb2NrGHyeq763DU7G4Mjo5uZbw2P0YoAKRUVy8glF9MFNq?token=WWWEjUVj7RtakPp3tZ1vIr88Ounj9M8ghMBRoaA6N5PSYcT4LHWD6nVokEsSxvIF
This endpoint now returns the file.
Step 5 - Download second source file
Downloads document second source file.
Endpoint
GET - /files/loadFile/hash/:hash
Example
/files/loadFile/hash/GBzrasdsVbcawD4QXkoPjr0iVAAnc4usIfg3jupVU36dwPb7YBuYgDKkQGmNTPTn?token=WWWEjUVj7RtakPp3tZ1vIr88Ounj9M8ghMBRoaA6N5PSYcT4LHWD6nVokEsSxvIF
This endpoint now returns the file.
Step 6 - Sign out (Optional)
Sign user out.
Endpoint
GET - /logout
Example
/logout?token=WWWEjUVj7RtakPp3tZ1vIr88Ounj9M8ghMBRoaA6N5PSYcT4LHWD6nVokEsSxvIF