Merge Document

Purpose

This API will allow you to generate documents and merge them.

HTTP Request URL

https://writer.zoho.com/writer/officeapi/v1/document/merge

Request Parameters

ParameterValueDescription
Mandatory Parameters
apikey423s******Uniquely identifies the web application in which the Writer editor is integrated.

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
output_formatStringSupported formats are pdf or docx. Specify a format in which you would like to download the merged document.

file_content

or

file_url

File

or

String

Below are the methods to provide the input file that needs to merged with the data depending on its location.

file_content  - if the input file is from your local drive or desktop.

file_url - if the input file is from a publicly accessible Web URL.
You can provide the data in any one of the below formats
merge_dataJSONObjectPass a String value through 'data' key as JSON Array.
merge_data_csv_contentFileProvide the required csv content in your API request body.
merge_data_json_contentFileProvide the required json content in your API request body.
merge_data_csv_urlurlProvide the required csv url in your API request body.
merge_data_json_url urlProvide the required json url in your API request body.
Optional Parameters
passwordStringSpecify a password if you would like to protect the merged document.

Sample Request


				curl --location --request POST "https://writer.zoho.com/writer/officeapi/v1/document/merge" \
  --form "apikey=423s******" \
  --form "output_format=pdf" \
  --form "password=***" \
  --form "file_content=@" \
  --form "merge_data={\"data\":[{\"name\":\"Amelia\",\"email\":\"amelia@zylker.com\"}]}"			

Sample Response

The document will be downloaded as bytes.