AddDocument - method

Input

Input is .xml file with following marks.

Element

Item description

Obligation

<Document>

 

 

+<apiClientID>

Api client ID - ID of caller of the method which has credentials to deal with eRegistrator

yes

+<DocumentName>

Document name - File name of document

yes

+<Data>

Data - Content if the document

yes

+<DocumentTypeCode>

Document type code - Code from the document type list which specify type of the document eg. incoming invoice, seles order, ...

yes

+<EntityType>

Entity type - type of entity to which belongs the document. 
​Posible values are S for customers, A for items, Z for employees, O for assets, D for work places and N for devices

yes

+<EntityCode>

Entity code - code of singel entity from list of entity type abowe to which belongs the document

yes

+<RootFolder>

Root folder - folder in which the document is stored in entity document explorer

no

+<NewFile>

New file - switch how to add dokument with equal file names to the same folder.
Possible vaues are: true new document is added as new document, false new document is added as new version of existing document

no

+<Attachments>

 

no

++<Attachment>

 

yes

+++<AttachmentName>

Attachment name - file name od document attachment

yes

+++<AttachmentData>

Attachment data - content of document attachment

yes

+<metadata>

 

no

++<Application>

Application - meta data from document properties

no

++<Author>

Author- meta data from document properties

no

++<Comment>

Comment - meta data from document properties

no

++<Company>

Company - meta data from document properties

no

++<DocumentDescription>

Document description - meta data from document properties

no

++<DocumentPublishTime>

Document publish time - meta data from document properties

no

++<Keywords>

Keywords - meta data from document properties

no

++<Leader>

Leader - meta data from document properties

no

++<Subject>

Subject - meta data from document properties

no

++<Type>

Type - meta data from document properties

no

++<User>

User - meta data from document properties

no

++<BusinessYear>

Business year - business year of the document - default is current calendar year

no

 

 

 

Output

The output is a .xml file in which it is stated, if the method is successful or not.

In case of successful addition of document returns eRegistrator ID of added document. Example:

<CreateResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Keys>
    <Key>
      <Name>DocumentID</Name>
      <Value>{E7837548-DAED-48EC-A407-07AF342E8744}</Value>
    </Key>
  </Keys>
  <ResultCode>Created</ResultCode>
  <Errors />
</CreateResult>

 

 

 

Natisni