Bulk Merge
Purpose
This API allows to merge documents in bulk. .
HTTP Request URL
https://{zohoapis_domain}/writer/api/v1/templates/{{template_id}}/bulkmerge
Path Parameters
Parameter | Data Type | Description |
Mandatory Parameters | ||
template_id | String | Specify a unique id for the writer document. |
Body Parameters
Parameter | Data Type | Description |
Mandatory Parameters | ||
output_settings | { | Using this param, you will be able to specify the following; format -> Specify the format in which you would like to download the merged document. Supported formats are zdoc, pdf and docx. The below key values are optional; filename -> Specify a name (without extension) for the merged document that needs to be downloaded. For example: "filename = test" (extension will be automatically added based on the provided output format) password -> Specify a password if you would like to protect the merged document. This key is supported only with docx and pdf files. merge_to -> Specify in which type you would like to merge the document. Supported merge types are separatedocand singledoc. separatedoc - If you would like to merge each record as a separate document. singledoc- If you would like to merge all the records as a single document. By default, all the records will be merged as a single document. |
You can provide the data in any one of the below formats | ||
merge_data | JSONObject | Pass a String value through 'data' key as JSON Array. |
merge_data_csv_content | File | Provide the required csv content in your API request body. |
merge_data_json_content | File | Provide the required json content in your API request body. |
merge_data_csv_url | url | Provide the required csv url in your API request body. |
merge_data_json_url | url | Provide the required json url in your API request body. |
Optional Parameters | ||
sign_service_name | String | Specify the third party sign service name with respect to which the merged document needs to be generated. Possible values are adobesign and docusign. By default, it will be zohosign. |
Sample Request
Copiedcurl --location --request POST "https://zohoapis.com/writer/api/v1/templates/ponazfea04477109f4681a831e7177d96bc40/bulkmerge" \
--header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
--form 'output_settings="{'\''format'\'':'\''docx'\'', '\''password'\'':'\''***'\'','\''merge_to'\'':'\''separatedoc'\'','\''filename'\'':'\''NDA<<test>>'\''}"'
--form "merge_data={\"data\":[{\"name\":\"Amelia\",\"email\":\"amelia@zylker.com\"}]}"
Sample Response
Copied{
"merge_report_data_url": "http://writer.zoho.com/writer/api/v1/merge/job/0tq5n465132106580437abe99b6f56f2b0c85/data",
"merge_report_url": "http://writer.zoho.com/writer/v1/mailmerge/job/0tq5n465132106580437abe99b6f56f2b0c85",
"records": [
{
"name": "Amelia",
"email": "amelia@zylker.com",
"download_link": {url},
"status": "inprogress"
}
],
}