Set Form Data in PDF

Purpose

This API allows you to fill the required fields in a PDF form.                    

HTTP Request URL

https://{zohoapis_domain}/pdfeditor/api/v1/pdf/formdata/set

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
file

File

or

String

Upload the PDF file which needs to be password protected using one of the following methods:

  • Upload the PDF directly from your local drive or desktop.
  • If the PDF is available via a publicly accessible web URL, you can provide the URL using the same parameter.

Note: The maximum file size allowed for the input PDF is 50 MB. It cannot be more than 150 pages.

input_options

 

String 

 

Specify the fields values which needs to be filled in the PDF form. 
Optional Parameters
password

 

 String

 

If the input PDF is  password protected, specify the password to unlock it.

Note: To use this API, an OAuth token should be generated with the following scopes: ZohoWriter.pdfEditor.ALL

Sample Request

Copiedcurl --location --request POST "https://www.zohoapis.com/pdfeditor/api/v1/pdf/formdata" \
  --header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
  --form 'file=@/Users/username/Documents/Original.pdf' \
  --form 'password="abc123"' \
  --form 'input_options={"formData":"{\"Given Name\":\"Amelia\",\"Family Name\":\"TL\",\"Postcode\":\"123456\",\"Make_RadioButton\":\"Option1\",\"Box1_CheckBox\":\"Yes\",\"Box3_CheckBox\":\"No\",\"Country\":\"India\",\"City\":\"Chennai\"}"}' 

Once the process begins, you will initially receive the 'status_url'. By invoking the 'status_url', you will be able to monitor the status of the scheduled job.

Sample Response

Copied{
	"status_check_url": "https://pdf.zoho.com/pdfeditor/api/v1/pdf/formdata/job/f931a01183b33",
	"status": "inprogress"
}

Success Response

Copied{
	"download_url": "https://pdf.zoho.com/pdfeditor/api/v1/pdf/formdata/download/f931a01183b33",
	"status": "success"
}