To trash an
existing document i.e. move it to the trash folder.
Request URL : POST
Method
XML : http://export.writer.zoho.com/api/private/xml/trashDocument/[documentID]?apikey=[API Key]&ticket=[Ticket]
JSON : http://export.writer.zoho.com/api/private/json/trashDocument/[documentID]?apikey=[API Key]&ticket=[Ticket]
Request parameters
:
To trash
an existing document from your Zoho Writer account we need to submit
a form data to
Writer with the following fields:
Field
|
Description
|
documentId
|
Unique ID of the existing document to be
trashed.
|
Sample Form (POST Method)
<form method="POST"
action="http://export.writer.zoho.com/api/private/xml/trashDocument/[documentId]?apikey=[APIKEY]&ticket=[Ticket]">
<input type="submit" value="TrashDoc" class="divbutton"
name="submit">
</form>
* It is mandatory to pass the apikey and ticket
parameters to access the trashDocument 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 trashed.
|
documentName
|
Name of the trashed document that is being
moved to trash folder.
|
Sample Response
The
following is the sample response for the above method:
<?xml
version="1.0" encoding="UTF-8" ?>
<response uri="/api/private/xml/trashDocument/8892000000009037">
<result>
<documentId>8892000000009037</documentId>
<documentName>Invoice</documentName>
</result>
</response>
Equivalent JSON
response
{
"response":
{
"uri": "/api/private/json/trashDocument/8892000000009037",
"result":
{
"documentId":"8892000000068007",
"documentName":"Invoice"
}
}
}
Errors
Trashing a document method may
return general errors. Other HTTP error code may be
1404.