Zoho - Trademark
Blogs
   Forums   Writer Home
  Toll Free : 888 900 9646

API Home >> Writer >> API Reference >> POST Method APIs



Upload new documents in your Zoho Writer account.



Request URL POST Method

                             XML :  http://export.writer.zoho.com/api/private/xml/uploadDocument?apikey=[API Key]&ticket=[Ticket]

                            JSON : http://export.writer.zoho.com/api/private/json/uploadDocument?apikey=[API Key]&ticket=[Ticket]


Request parameters :

To upload documents in Zoho Writer account we need to submit a form data to Writer with the following fields:

Field
Description
content
Content of the document


Sample Form (POST Method)


<form method="POST" action="http://export.writer.zoho.com/api/private/xml/uploadDocument?apikey=[APIKEY]&ticket=[Ticket]"
enctype="multipart/form-data"
>

<input type="file" name="content" size="38">

<input type="submit" value="UploadDocument" class="divbutton" name="submit">

</form>



* It is mandatory to pass the apikey and ticket parameters to access the uploadDocument api.


Response fields

The schema document for the API response is located at: http://export.writer.zoho.com/schema/restapi/save.xsd

Field
Description
documentId
Unique ID associated with the document that is being uploaded.
documentName
Name of the uploaded document.


Sample Response

The following is the sample XML response for the above method:


<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/private/xml/uploadDocument">
  <result>

     <documentId>
8892000000081001</documentId>
     <documentName>Search</documentName>

  </result>
</response>


Equivalent JSON response


{
  "response":
   {
        "uri": "/api/private/json/uploadDocument",
        "result":
        {
   
            "
documentId":"8892000000081001",
            "documentName":"Search"
        }
    }
}  


Errors

Uploading documents method may return general & input errors. Other HTTP error code may be 1500 & 1802.