Skip to main content

Download Document

The Writer API allows to download docs that are stored in your Writer account. You can download files in docx, odt, rtf, txt, html and pdf formats. To download a document, you should make an authorized HTTP GET request by including the document_id and format parameters. The document will be downloaded in docx format by default if you don't specify this parameter in your API request.

Purpose 

To download the document in the specified format.

HTTP Request URL

https://{zohoapis_domain}/writer/api/v1/download/{{document_id}}

Path Parameters

ParameterData TypeDescription
Mandatory Parameters
document_idStringSpecify the unique id of the document to be downloaded.

Query Parameters

ParameterData TypeDescription
Optional Parameters
formatString

Specify the format in which the document needs to be downloaded. By default, the document will be downloaded in 'docx' format.


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

options{
"include_changes":<String>,
"include_comments":<String>, "include_styles":<String>
}

include_changes -> Specify how the track changed content needs to be reflected in downloaded file. The possible values are:

  • as_markups: If the marked up content needs to be included in downloaded document.
  • all: To download the file by accepting all the track changes done.
  • none: To download the document by rejecting the track changes done.

include_comments -> Specify if the comments needs to be included in the downloaded file or not. The possible values are:

  • all: To download the file with the comments.
  • none: To download the document without the comments.

Note: This parameter is applicable only for docx and pdf files.

 

include_styles-> Specify if the styles needs to be included in the downloaded file or not. The possible values are:

  • as_inline: To download the file along with inline styles. This will help to retain the font colors, font sizes and other styles from the document.
  • none: To download the document without any styles. This will only retain the heading tags (H1, H2 etc), basic formatting and hyperlinks.

Note: This parameter is applicable only for html and zip files.

sign_service_nameString

This param needs to be configured when you would like to upload the downloaded document with signer fields to a third party sign service. 

 

Possible values: zohosign, adobesign and docusign. 

 

Default value for this param will be zohosign.

 

Note: This param can be used only when the 'format' param value is configured as pdf.

passwordString

Specify a password if you wish to protect the downloaded document.


Note: This parameter is applicable only for docx and pdf files.

options

ParameterTypePossible ValuesDefault Value
include_changesStringas_markups / all / nonenone
include_commentsStringall / nonenone
include_stylesStringas_inline / noneas_inline

Notes: 

  • To use this API, an OAuth token should be generated with the following scopes: ZohoWriter.documentEditor.ALL, ZohoPC.files.ALL, WorkDrive.files.ALL, WorkDrive.organization.ALL, WorkDrive.workspace.ALL
  • The comments present in the document will be reflected in the downloaded document based on the comment visibility permission provided for that particular document.
  • This API is subject to throttle limits. For details on the applicable rate limits, please refer to this help link.

Sample Request

Copiedcurl "https://www.zohoapis.com/writer/api/v1/documents/0k1457c4737fac1b787eaf?format=html"
-X GET
-H "Authorization: Zoho-oauthtoken xyz"

Sample Response

The document will be downloaded in the specified format.