Skip to main content
Version: 2.2.2

newDocument

This method allows creating a document. To use it, it is necessary to follow the standard documented below:

Java class
Requestweb/wwwroot/ws/java/document/NewDocumentRequestType.java
Returnweb/wwwroot/ws/java/document/NewDocumentResponseType.java

Request:

ID #RequiredDescription
IDCATEGORYXCategory ID #.
IDDOCUMENTDocument ID #.
TITLEXDocument title.
DSRESUMEXDocument summary.
DTDOCUMENTDocument date. Date format must be Y-M-D (Year-Month-Day)
ATTRIBUTESDocument attributes.
Example:
identifier_of_attribute1=value_of_attribute1;
identifier_of_attribute2=value_of_attribute2;
identifier_of_attribute3=value_of_attribute3.

Example with a multivalued attribute:
identifier_of_attribute1=value1_of_attribute1,value2*
of_attribute1,value3_of_attribute1.
Note: For attributes with a numeric value, the decimal place separator must be "." (dot). For date fields, the value must have the “Y-M-D” (Year-Month-Day) format.
IDUSERUser responsible for the document.
PARTICIPANTSRevision participants:
CONTROL: Control type
▪ 1 - User;
▪ 2 - Department;
▪ 3 - Position;
▪ 4 - Department/Position;
▪ 5 - Team.
ENTCONTROL: ID #. E.g.: User ID
for user control.
STEP: Step. E.g.:1,2,3,4
▪ 1 - Draft;
▪ 2 - Review;
▪ 3 - Approval;
▪ 4 - Release.
Sequence: Sequence. E.g.:2,2,2,2
QTDEADLINE: Deadline (days). E.g.: 5
FGMODELTemplate ID #.
▪ 1 - For the default template of the category.
FILEFiles array:
NMFILE: String; File name.
BINFILE: Stream; Electronic file binary¹.
CONTAINER: Container structure item ID #.
ERROR: Starting from version 2.0, this parameter became obsolete. During the import, leave it blank.
KEYWORDKeyword array:
▪KeywordID: String; Keyword ID #.
info

¹ - Content of the electronic file converted to Base64. If you are testing the usage through the web service data source, we suggest converting a small text through a website of your choosing.

Request structure:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:document">
<soapenv:Header/>
<soapenv:Body>
<urn:newDocument>
<!--You may enter the following 11 items in any order-->
<urn:idcategory>?</urn:idcategory>
<urn:iddocument>?</urn:iddocument>
<urn:title>?</urn:title>
<urn:dsresume>?</urn:dsresume>
<urn:dtdocument>?</urn:dtdocument>
<urn:attributes>?</urn:attributes>
<urn:iduser>?</urn:iduser>
<urn:participants>
<!--0 to 1000 repetitions:-->
<urn:item>
<!--You may enter the following 5 items in any order-->
<urn:CONTROL>?</urn:CONTROL>
<urn:ENTCONTROL>?</urn:ENTCONTROL>
<urn:STEP>?</urn:STEP>
<urn:SEQUENCE>?</urn:SEQUENCE>
<urn:QTDEADLINE>?</urn:QTDEADLINE>
</urn:item>
</urn:participants>
<urn:fgmodel>?</urn:fgmodel>
<urn:file>
<!--0 to 1000 repetitions:-->
<urn:item>
<!--You may enter the following 4 items in any order-->
<urn:NMFILE>?</urn:NMFILE>
<urn:BINFILE>cid:326079726430</urn:BINFILE>
<urn:CONTAINER>?</urn:CONTAINER>
<urn:ERROR>?</urn:ERROR>
</urn:item>
</urn:file>
<urn:keyword>
<!--0 to 1000 repetitions:-->
<urn:item>
<urn:KeywordID>?</urn:KeywordID>
</urn:item>
</urn:keyword>
</urn:newDocument>
</soapenv:Body>
</soapenv:Envelope>

Return:

ID #Description
returnSUCCESS: 1: ID_DOCUMENT_CREATED: Document created successfully.
FAILURE: 0: Message with the error found.