Operations with existing document - Attachments
Please note that an authentication token is required as a parameter in the API call. Also, you need to upload the file first and create a document.
Requirements
Document ID
1. Add attachment to the document
To add an attachment to an already existing document, you can use the following API call:
POST /attachments/:documentId?token=:authenticationToken
This call will add an attachment to the specified document, using the file hash of the previously uploaded file.
In the body of the request, you will need to specify the following information:
fileHash: The file hash of the attachment you want to add.
document_name: The name of the attachment document.
Example
Request
POST /attachments/d_default/d148b19a-4fa9-442e-adfd-7aa68b8eb766?token=ADFFQBYXP2NVGR6PAP3KOR27FETP6
{
"fileHash": "9pd45smja4asdxa4w5a7u8dasd4wa6",
"document_name": "Document attachment",
}
The response of the API call will have a status of 200, indicating that the attachment has been added to the specified document.