Merge and Share Fillable Link

Purpose

This API will allow you to generate pre-filled fillable links for the given records.

Quick Reference

PropertyValue
MethodPOST
Request URLhttps://{zohoapis_domain}/writer/api/v1/documents/{document_id}/merge/sharetofill
ScopesZohoWriter.documentEditor.ALL, ZohoWriter.merge.ALL, ZohoPC.files.ALL, WorkDrive.files.ALL
Rate LimitSee Writer API throttle limits

Parameters

Path Parameters

ParameterData TypeDescription
document_idStringSpecify a unique id for the Writer document.

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
Merge Data — pass data using 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_urlurlProvide the required json url in your API request body.
record_idStringInstead of using merge_data, you can pass the record_id and we will fetch the data internally.
Note: This is applicable only for Zoho CRM, Creator and Bigin templates.
Maximum length allowed: 25
Optional Parameters
test_modeBoolean (true/false)Using this param, you can test the Merge APIs without consuming any credit points. The output file will contain a watermark as it is used only for testing purpose.
Test mode limit: 50 merges/day for an org.

Notes

  • Before using this API, ensure that the settings of 'Merge and Share Fillable Link' option under 'Choose Output' section is configured for the template inside our editor UI.
  • You can also merge your documents and generate prefilled fillable links to collect data using this deluge task.
  • For possible errors, refer to error codes.

Curl - Sample Request

Copiedcurl -X POST "https://www.zohoapis.com/writer/api/v1/documents/{document_id}/merge/sharetofill" \
  -H "Authorization: Zoho-oauthtoken <ACCESS_TOKEN>" \
  -F "merge_data={\"data\":[{{\"name\":\"Johnson\",\"email\":\"johnson@zylker.com\"}]}"

Sample Response

Copied{
    "merge_report_data_url": "https://writer.zoho.com/writer/api/v1/merge/job/<jobId>/data",
    "merge_report_url": "https://writer.zoho.com/writer/v1/mailmerge/job/<jobId>",
    "records": [
        {
            "data": {“name”:”Amelia”,”email”:"amelia@zylker.com"},
	        "fillable_link": "https://writer.zoho.com/writer/open/ponazfea04477109f4681a831e7177d96bc40/fill", 
            "status": "inprogress"
        }
    ]
    "status": "success"

Deluge Snippet

Copieddata = Map();
data.put("InvoiceNo","12345"); 
data.put("InvoiceDate","27 May 2022"); 
data.put("InvoiceAmount","$100");
param = Map();
param.put("merge_data",{"data":data});
info param;
response = invokeurl
[
	url :"https://www.zohoapis.com/writer/api/v1/documentsolce2ef696f1810ee46ed8331f25aaece75dd/merge/sharetofill"
	type :POST
	parameters:param
	connection:"<connection_name>"
];
info response;

Sample Response

Copied{
  "merge_report_data_url": "https://writer.zoho.com/writer/api/v1/merge/job/<jobId>/data",
  "merge_report_url": "https://writer.zoho.com/writer/v1/mailmerge/job/<jobId>",
  "records": [
    {
      "data": {
          "InvoiceNo": "12345",
          "InvoiceDate": "27 May 2022",
          "InvoiceAmount": "$100",
          "id": "0e002287-7c45-4188-af9f-65*****”
      },
      "fillable_link": "https://writer.zoho.com/writer/open/ponazfea04477109f4681a831e7177d96bc40/fill", 
      "status": "inprogress"
    }
  ],
  "status": "inprogress"
}