Create Documents by Parent Folder ID
POST /ws/rest/service/v1/dm/document/create/<parent_folder_id>
Purpose
- Provide the ability for customers to add documents (files) to a particular folder using the folder node id.
- Supports adding revision to an existing document.
Input
Path Parameter
- parent_folder_id : Parent folder's node id under which the documents will be created.
- Use “Get Folder or Document meta data by path” REST Service to get the node_id value for the folder.
This a multi-part request and all parameters should be listed before all file parts and should use the following order.
- projectnumber (String) Optional.
Project number for project/shell level DM. Empty for Company level DM. (If projectnumber is not given, then the document will be created under company workspace. If the parent folder Id is not under company workspace, then the document will not be visible even in company workspace).
- dorevise: (String) Optional.
This flag is used to automatically revise file with same file name. Expected values are "yes" or "no". Default is no.
- data (JSON String) Required:
List of field and values for the document attribute form.
- Name: Name of the document that needs to be created.
Example
To create a document "ProjectDetails.doc" under "/Project Documents/Service docs" then data should as below
[
{"fileName":"ProjectDetails.doc","docTitle":"project details","revNo":"1","issueDate":"06/01/2016", additional document attribute form properties, excluding creation date and owner }
]
Notes:
- Except for creation date and owner, you can add any additional document attribute form properties as key value pairs in the preceding JSON.
- This call only updates the elements visible in the upload window, such as Document Title, Revision No, and Issue Date. The system cannot update Custom Data Elements that are not listed in the upload window.
Example Multipart Form Request
Note: The form data body boundary in the example below is "—file upload—", but can be anything (or left unset).
-----file upload---
Content-Disposition: form-data; name="shortname"
unifier
-----file upload---
Content-Disposition: form-data; name="authcode"
MTIzMTIz
-----file upload---
Content-Disposition: form-data; name="dorevise" yes
-----file upload---
Content-Disposition: form-data; name="data"
[
{"Name":"ProjectDetails.doc","Owner":"Company Administrator","Creation Date":"01/01/2016","% Complete":"100","Description":"Fold 1" }
]
-----file upload---
Content-Disposition: form-data; name="0"; filename="b.txt" Content-Type: text/plain
test document contents
-----file upload-----
Output
JSON object containing 'status', 'data', 'message'
Related Topics
Update Documents Meta Data by Path
Update Document Meta Data by Document ID
Get Documents by Parent Folder ID
Last Published Tuesday, July 1, 2025