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
Parameter | Data Type | Description |
Mandatory Parameters | ||
url | String | Specify the web URL, through which the document will be converted. |
format | String | Specify the format of the document to be converted. Supported file formats - docx, odt, rtf, txt, html, pdf |
filename | String | Specify a name to the document to be converted. |
Optional Parameter | ||
Password | String | Specify 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;