Convert Documents with Web URL



Purpose 

To convert any document's existing file format (say html) to another file format (say docx or txt) with web URL.

Supported file formats -> docx, odt, rtf, txt, html, pdf

HTTP Request URL

https://{zohoapis_domain}/writer/api/v1/documents/convert

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
urlStringSpecify the web URL, through which the document will be converted.
formatStringSpecify the format of the document to be converted.
Supported file formats - docx, odt, rtf, txt, html, pdf
filenameStringSpecify a name to the document to be converted.
Optional Parameter
PasswordStringSpecify a unique password for the document to be converted.

Curl Snippet

Copiedcurl --location --request POST "https://www.zohoapis.com/writer/api/v1/documents/convert" \
  --header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
  --form "url=https://calibre-ebook.com/downloads/demos/demo.docx" \
  --form "format=docx" \
  --form "filename=Output filename"

Deluge Snippet

Copiedurl = "https://example.com/download/publicdocument";
filedata = invokeurl
[
url : url
type :GET
];
filesList = List();
filesList.add({"paramName":"content", "content":filedata});
filesList.add({"paramName":"format", "content":"pdf","stringPart":"true"});
filesList.add({"paramName":"filename", "content":"Converted_doc","stringPart":"true"});
response = invokeurl
[
url: "https://zohoapis.com/writer/api/v1/documents/convert"
type: POST
files: filesList
connection:""
];
return response;

Sample Response

Converted document will be downloaded.