How to download submissions as PDF using API?

  • tic_travel
    Asked on September 20, 2024 at 11:20 AM

    Hello, I would like to make an API connection to this form:

    https://www.jotform.com/build/241983039247463

    Will it be possible to receive the PDF file after filling out the form?


  • Wilson JotForm Support
    Replied on September 20, 2024 at 11:39 AM

    Hi Dan,

    Thanks for reaching out to Jotform Support. Unfortunately, there's no API endpoint for automatic PDF generating, but you can generate the PDF link manually through API, so you can download the PDF file. You can use the following URLs to download the PDF file:

    • https://www.jotform.com/server.php?action=getSubmissionPDF&sid=SubmissionID&formID=FormID or
    • https://www.jotform.com/pdf-submission/SubmissionID

    You just need to replace the bold text (SubmissionID and FormID) with the actual submission ID and form ID that you generated.

    You can also check out Jotform API Documentation.

    Give it a try and let us know if you have any other questions.

  • tic_travel
    Replied on September 20, 2024 at 11:46 AM

    Thanks, I saw the solution but it's not good because I get a PDF of the fields in the form (print) - https://www.jotform.com/pdf-submission/6026406588256962291

    And not the final file (original)...

  • Jovito JotForm Support
    Replied on September 20, 2024 at 12:04 PM

    Hi Dan,

    You can use the following API call below to generate the Original PDF. Just replace the information enclosed in curly braces.

    https://api.jotform.com/pdf-converter/{formID}/fill-pdf?download=1&submissionID={submissionID}&apikey={apiKey}

    It's easy to find your form ID. Let me show you how:

    1. In Form Builder, click Publish on the blue navigation bar.
    2. Copy the ID from the form link and use this on the API call.

    How to download submissions as PDF using API? Image 1 Screenshot 20

    Whenever someone submits a response to your form, their submission is assigned a unique number called the Submission ID. We have a guide here to get the submission ID. API Key is a unique value or a secret token assigned to Jotform users. An API key identifies the user. You can use it to authenticate your information to third-party web services. We have a guide here to get the API Key.

    Give it a try and let us know if you need any help.

Your Answer