ZW - Permanently delete a document

Tags:  



To permanently delete a document from Zoho Writer account.



Request URL POST Method

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

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

Request parameters :

To permanently delete a document from your Zoho Writer we need to submit a form data to Writer with the following fields:

Field
Description
documentId
Unique ID of the trashed document.

Note: The documents present in the trash folder only are permanently deleted from Zoho Writer account. All documents in your My Docs folder is moved to the trashed folder at the first instance of delete operation.

Sample Form (POST Method)


<form method="POST"    action="http://export.writer.zoho.com/api/private/xml/deleteDocument/[documentId]?apikey=[APIKEY]&ticket=[Ticket]">

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

</form>



* It is mandatory to pass the apikey and ticket parameters to access the deleteDocument 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 deleted document.
documentName
Name of the deleted 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/deleteDocument/8892000000009037">
  <result>

     <documentId>
8892000000009037</documentId>
        <documentName>Invoice</documentName>

    </result>
</response>


Equivalent JSON response


{
  "response":
   {
        "uri": "/api/private/json/deleteDocument/8892000000009037",
        "result":
        {
   
            "
documentId":"8892000000068007",
            "documentName":"Invoice"
        }
    }
}  



Errors


Deleting a document method may return general errors. Other HTTP error code may be 1404.
 




 RSS of this page

Written by:   Written by:   Version:   Last Edited By:   Modified