Public API description

For GET requests URL should be made as:
http://JaDocz.com/admin/public/api/[method name]?[parameters]

All requests except for uploadDocument should be requested with GET or POST methods with UTF-8 parameter encoding.


uploadDocument


Sinchronized document uploading. This method is called with POST request in multipart/form-data encoding.
Request parameters:
parameter value description
userId integer user ID at JaDocz.com
apiToken string API access token. It is generated at the user settings page
file data Uploading file

Response format:
<response>
  <id>[id]</id>
  <sign>[sign]</sign>
  <state>LOADING</state>
</response>

Response parameters:
parameter value description
id integer document ID at JaDocz.com
sign string signature, required for future requests
state "WAITING", "CONVERTING", "ERROR" document status. If task was sent successfully, should not be ERROR

uploadDocumentFromUrl


This method allows anisochronous upload of the document by the provided link and sends it to conversion. The request is generated before the upload is finished and sometimes even before it actually begins.
Request parameters:
parameter value description
userId integer user ID at JaDocz.com
apiToken string API access token. It is generated at the user settings page
url string Initial document URL
format "doc", "docx", "xls" etc. Initial document format

Response format:
<response>
  <id>[id]</id>
  <sign>[sign]</sign>
  <state>LOADING</state>
</response>

Response parameters:
parameter value description
id integer document ID at JaDocz.com
sign string signature, required for future requests
state "LOADING", "ERROR" document status. If task was sent successfully, should be LOADING

getProgress


Returns document conversion status.
Request parameters:
parameter value description
id integer document ID at JaDocz.com
sign string signature, received while requesting uploadDocumentFromUrl

Response format:
<response>
  <state>[state]</state>
  <message>[message]</message>
</response>

Response parameters:
parameter value description
state "LOADING", "WAITING", "CONVERTING", "COMPLETE", "ERROR" document status
message string error description

getDocumentList


Returns user's list of documents.
Request parameters:
parameter value description
userId integer user ID at JaDocz.com
apiToken string API access token. It is generated at the user settings page
offset integer Position number in the list, from which the documents are shown
limit integer from 1 to 1000, max 1000 Maximum number of results in the response. By default set to 100

Response format:
<response>
  <totalResults>123</totalResults>
  <offset>0</offset>
  <limit>10</limit>
  <documents>
    <document>
      <id>5512</id>
      <key>4f5981bd58ef8711cc006875caaf9e5a</key>
      <shortTitle>test</shortTitle>
      ...
    </document>
    <document>
      ...
    </document>
    ...
  </documents>
</response>

removeDocument


Request parameters:
parameter value description
userId integer user ID at JaDocz.com
apiToken string API access token. It is generated at the user settings page
id integer document ID at JaDocz.com

updateDocument


Request parameters:
parameter value description
userId integer user ID at JaDocz.com
apiToken string API access token. It is generated at the user settings page
id integer document ID at JaDocz.com
title text Document name
description text Document description
tags text Document tags, divided with [,;]
listingMode char H - hidden, V - visible
categoryId integer Document category ID