Merge and Share Fillable Link

Purpose

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

HTTP Request URL

https://{zohoapis_domain}/writer/api/v1/documents/{{document_id}}/merge/sharetofill

Path Parameters

ParameterData TypeDescription
Mandatory Parameters
document_idStringSpecify a unique id for the Writer document.

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
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.
record_idString

Instead 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 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.

Note:

  • To use this API, an OAuth token should be generated with the following scopes ZohoWriter.documentEditor.ALL and ZohoWriter.merge.ALL 
  • 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.

Curl - Sample Request

Copiedcurl --location --request POST "https://www.zohoapis.com/writer/api/v1/documents/ponazfea04477109f4681a831e7177d96bc40/merge/sharetofill" \
  --header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
  --form "merge_data={\"data\":[{\"name\":\"Amelia\",\"email\":\"amelia@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"
}