Merge and Share Fillable Link
Purpose
This API will allow you to generate pre-filled fillable links for the given records.
Quick Reference
| Property | Value |
|---|---|
| Method | POST |
| Request URL | https://{zohoapis_domain}/writer/api/v1/documents/{document_id}/merge/sharetofill |
| Scopes | ZohoWriter.documentEditor.ALL, ZohoWriter.merge.ALL, ZohoPC.files.ALL, WorkDrive.files.ALL |
| Rate Limit | See Writer API throttle limits |
Parameters
Path Parameters
| Parameter | Data Type | Description |
|---|---|---|
| document_id | String | Specify a unique id for the Writer document. |
Body Parameters
| Parameter | Data Type | Description |
|---|---|---|
| Mandatory Parameters | ||
| Merge Data — pass data using 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. |
| record_id | String | 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, Creator and Bigin templates. Maximum length allowed: 25 |
| Optional Parameters | ||
| test_mode | Boolean (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"
}