Upload image attachment

Upload an image attachment

POST https://api.complycube.com/v1/documents/:id/upload/:documentSide

Associates an image attachment to an existing document. The images must be either in JPG, PNG, or PDF format. Each side of the document must be between 34 KB and 4 MB.

Path Parameters

Headers

Request Body

{
    "id": "5eb169302d868c0008828591",
    "fileName": "front-test.jpg",
    "documentSide": "front",
    "downloadLink": "/documents/5eb158880c19580007310f22/images/5eb169302d868c0008828591/download",
    "contentType": "image/jpg",
    "size": 72716,
    "createdAt": "2020-01-04T17:24:29.146Z",
    "updatedAt": "2020-01-04T17:24:29.146Z"
}

Example request

curl -X POST https://api.complycube.com/v1/documents/{:documentId}/upload/{:documentSide} \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          	"fileName": "front-test.jpg",
          	"data": "<BASE64_DATA_CONTENT>"
        }' 

Last updated