Download a contractor answer

Get pre-signed URL to download the files sent by a contractor to answer to a call of tender.
As an answer is attached to a document, itself attached to a template, it is necessary to define the projectId, templateId and documentId.

GET /aos/v1/projects/{projectId}/templates/{templateId}/documents/{documentId}/download/{version?}

Query params

Parameter Type Mandatory Description
projectId string (uuid) yes
templateId string (uuid) yes
documentId string (uuid) yes
version string (uuid) If the version is not specified, the route will return an array with versions available for downloading. If the version is specified the pre-signed URLs will be returned.

Response

If the version is not specified:

Status: 200 OK
{
    "document": {
        "id": "97740903-dad3-425f-a6ea-4c3b53ba7a3b",
        "versions": [
            "1"
        ]
    }
}

If the version is specified:

Status: 200 OK
{
    "document": {
        "id": "97740903-dad3-425f-a6ea-4c3b53ba7a3b",
        "files": [
            {
                "name": "dpgf.xlsx",
                "url": "https://presigned-url/path/file.xlsx",
                "type": "DPGF"
            }
        ]
    }
}

If the version specified does not exist:

Status: 404 Not Found
{
    "code": 404,
    "message": "The resource cannot be found"
}