writer.saveDocument - Edit & Save an existing
document
Arguments
1. [struct] - required*
Containing Keys:
| Field |
Description |
| documentname |
[scalar] - required* - Specify the name of the document to be edited &
saved. |
| content |
[scalar] - required* - Add/Edit contents to the existing document before
saving. |
| documentid |
[scalar] - required* - Sets the unique
document id for the particular document currently working on. |
| version
|
[scalar] - required* - Specify the version of
the document being currently worked upon. |
Sample call to
writer.saveDocument
POST /interface/xmlrpc
HTTP/1.0
Host: http://www.writer.zoho.com/
Content-Type: text/xml
Content-Length:
<?xml
version=\"1.0\"
encoding=\"UTF-8\"?>
<methodCall>
<methodName>writer.saveDocument</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>documentname</name>
<value><string>test</string></value>
</member>
<member>
<name>content</name>
<value><string><![CDATA[hi have a nice day - some new
lines are added to the existing
document]]></string></value>
</member>
<member>
<name>documentid</name>
<value><long>6000000057003</long></value>
</member>
<member>
<name>version</name>
<value><double>1.1</double></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
Response
1.
[methodResponse] - required*
Containing Keys:
- [scalar] - Name of one of the document currently being edited/saved.
- [scalar] - Unique ID associated with the saved document.
- [scalar] - Specifies the last saved version of the document.
- [scalar] - Unique document url to differentiate multiple documents having
similar name.
- [scalar] - Displays the email ID of the document owner.
- [date] - Displays the created date of the document. E.g. Thu, Sep 28, 2006.
- [boolean] - Checks whether the document was trashed & restored in the
list. Takes any one of the values - True or False.
- [scalar] - Specifies the Email ID of the person who has last edited the
document. In case the document is shared & it is edited by one of the
invitees, then the Email ID will be different from that of the author_name's ID.
- [scalar] - Displays the list of email addresses to whom the document has
been shared. Shows blank in cases sharing access is disabled.
- [boolean] - Checks whether the document has been locked exclusively for
editing in a shared environment. True means the lock is enabled.
- [boolean] - Checks whether the document has been posted to any of the blog
services. False status indicates that the document is not posted to any of the
blog service.
- [scalar] - Displays information whether the document is saved successfully
or not.
Sample return value for
writer.saveDocument
HTTP/1.1 200 OK
Connection:
close
Content-Length:
Content-Type: text/xml
Date: Wed 01 Nov 2006 23:45:59
GMT
Server: Apache/1.3.4
(Unix)
<methodResponse>
<Save>
<document_name>testt</document_name>
<document_id>6000000046043</document_id>
<version>-1.0</version>
<document_name_url>hi</document_name_url>
<author_name>troycooley</author_name>
<created_date>Mon,
Sep 25,
2006</created_date>
<document_trashed>false</document_trashed>
<lastmodifiedby>kevinshine</lastmodifiedby>
<shared_users>[]</shared_users>
<document_locked>false</document_locked>
<document_blogged>false</document_blogged>
<info>The document is saved
successfully</info>
</Save>
</methodResponse>