Create Fillable Link
Purpose
Create a fillable link for a given document to fill and submit it as a form. Users can upload an existing fillable template from their local drive or a publicly accessible Web URL and generate a fillable link.
Quick Reference
| Property | Value |
|---|---|
| Method | POST |
| Request URL | https://{api.office-integrator_domain}/writer/officeapi/v1/fillabletemplates/fillablelink |
| Content-Type | multipart/form-data |
Parameters
Body Parameters
| Parameter | Value | Mandatory/Optional | Description |
|---|---|---|---|
| apikey | 423s***** | Mandatory | Uniquely identifies the web application in which the Writer editor is integrated. |
| document or url | File or String | Mandatory | Method of providing the input file depending on its location. document - if the input file is from your local drive or desktop. url - if the input file is from a publicly accessible Web URL. Supported file formats during import: zfdoc, zdoc, docx and pdf. |
| submit_settings | { "callback_options": { "url": <Your Save URL>, "output": { "format": "pdf", "<filename>": "${filename}" }, "http_method_type": "post", "retries": <Integer>, "timeout": <Integer> }, "redirect_url": <URL>, "onsubmit_message": <String> } | Mandatory | Using this param, you will be able to specify the following; onsubmit_message -> Specify the message that needs to be displayed when the form is submitted. |
| form_options | { "download":true, "print":true, "submit":true } | Optional | Define the form permissions for the users. |
| form_language | en | Optional | Set the interface language for the fillable form. |
| prefill_data | { "name":"Amelia" } | Optional | Define the data that needs to be pre-filled in the form. Example: {"name":"Amelia"} - The value 'Amelia' will be pre-filled in the fillable field with label 'name'. Note: Only fillable fields with labels can be pre-filled. |
| document_info | { "document_name":"New", "document_id":"1349" } | Optional | Set a unique document ID and specify the display name of the new fillable template. |
| user_info | { "user_id":"9173", "display_name":"Ken" } | Optional | Identify the user in the document with a user ID and display name. |
submit_settings
| Parameter/Keys | Type | Mandatory/Optional | Possible Values | Default Value |
|---|---|---|---|---|
| callback_options.url | String | Mandatory | URL (max length: 65535) | — |
| callback_options.output | String | Optional | ||
| callback_options.http_method_type | String | Optional | post / put | post |
| callback_options.retries | Integer | Optional | 0 to 3 | 0 |
| callback_options.timeout | Integer | Optional | 1 to 120000 (ms) | 120000 |
| redirect_url | String | Optional | URL | — |
| onsubmit_message | String | Optional | Any string | — |
url Usage
Zoho Office Integrator allows partners and businesses to save the data filled in the form to their specified storage server through the url method.
A callback url is a publicly accessible web URL/Service to which Zoho will push the data filled in the form to the partner's server from Writer editor.
Requirements:
- Partner's remote servers need to expose one of their ports — port 443 (HTTPS) or port 80 (HTTP) — for Zoho Writer to push the data back.
- The url value specified in the request should be a proper domain name and publicly accessible over the web. Example: https://yourdomain.com/save.php
Response on Form Submit
When the form is submitted, the following key names are pushed back:
| Key Name | Type | Description |
|---|---|---|
| data | JSON | The data filled in the fillable form. |
| document_info | JSON | The unique id and the display name of the fillable form. |
| user_info | JSON | The user id and the display name of the user. |
| output_bytes | Bytes | The submitted form in the configured output format. |
Sample Response:
{
data:{
'name’:’Amelia’
...
},
document_info:{
"document_name":"New",
"document_id":"1349"
},
user_info:{
'user_id':'9173',
'display_name’:’Ken’
},
output_bytes:<bytes>
}
form_options
| Parameter/Keys | Type | Mandatory/Optional | Possible Values | Default Value |
|---|---|---|---|---|
| download | Boolean | Optional | true / false | true |
| Boolean | Optional | true / false | true | |
| submit | Boolean | Optional | true / false | true |
form_language
| Parameter/Keys | Type | Mandatory/Optional | Possible Values | Default Value |
|---|---|---|---|---|
| form_language | String | Optional | en / es / jp | en |
document_info
| Parameter/Keys | Type | Mandatory/Optional | Possible Values | Default Value |
|---|---|---|---|---|
| document_id | String | Optional | e.g., 24eru24960v | — |
| document_name | String | Optional | e.g., Sample | Untitled |
user_info
| Parameter/Keys | Type | Mandatory/Optional | Possible Values | Default Value |
|---|---|---|---|---|
| user_id | String | Optional | e.g., 03588563264 | — |
| display_name | String | Optional | e.g., Ken / James / Adam | Guest |
Notes and Limits
- Editor customization parameters and their values are case-sensitive.
- The callback url must be a publicly accessible URL over port 443 (HTTPS) or port 80 (HTTP).
- Only fillable fields with labels can be pre-filled using prefill_data.
- Supported file formats during import: zfdoc, zdoc, docx and pdf.
- As of now, only 'PDF' is supported as the output format for submitted forms.
- You can customize the name of the submitted form using the <filename> key inside the output parameter.
- For possible error codes, refer to: Error Codes
- For other server-side SDK sample code, refer to: Server-Side SDKs
Sample Request
Copiedcurl -X POST \
https://api.office-integrator.com/writer/officeapi/v1/fillabletemplates/fillablelink \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F apikey=423s***** \
-F document=@/Users/username/Documents/Sample.docx \
-F 'submit_settings={'\"redirect_url'\":'\"'\",'\"onsubmit_message'\":'\"Submitted Successfully'\",'\"callback_options'\":{'\"url'\":'\"https://domain.com/save.php'\",'\"http_method_type'\":'\"post'\"}}' \
-F 'form_language=en' \
-F 'form_options={'\''download'\'':true,'\''print'\'':true,'\''submit'\'':true}' \
-F 'document_info={'\''document_name'\'':'\''New'\'', '\''document_id'\'':1349}' \
-F 'user_info={'\''user_id'\'':'\''1973'\'','\''display_name'\'':'\''Ken'\''}'