Acessar PDFs Criados via API

  • juliobraz
    Perguntado em 27 de fevereiro de 2024 às 12:44

    Olá estava explorando os recursos da API, mas não encontrei recursos referentes a pegar de alguma forma o pdf gerado baseado no template que o Jotform disponibiliza.


    Gostaria de saber se é possível obter este recurso de alguma forma via API.

  • Ylli_P Jotform Support
    Respondido em 27 de fevereiro de 2024 às 15:00

    Hello Julio,

    Thanks for reaching out to Jotform Support. Unfortunately, our Portuguese Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Portuguese, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    Now let me help with your question.. The Jotform API allows you to connect to your form data without having to use the Jotform website. Please note that this feature is applicable to all our users. You can find more info about the Jotform API on this guide.

    Let us know if you have any other questions.

  • beelieve_group
    Respondido em 27 de fevereiro de 2024 às 15:04

    Hello Ylli


    All good.?


    No problem, we speak in English.


    I already read this guide, but my doubt remained.


    So if you can answer me whether it is possible on any API endpoint to access the pdfs generated when someone fills out a form linked to a certain template, I will be grateful for your answer.

  • Ylli_P Jotform Support
    Respondido em 27 de fevereiro de 2024 às 15:56

    Hello Julio,

    Thanks for getting back to us. I'm afraid that what you are looking for is not possible. What you can do is that you can construct the PDF link manually through API so you can download the PDF file.  You can use the following URL 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

    Just replace the bold text (SubmissionID and FormID) with the actual submission ID and form ID that you retrieved through API.

    Here is a guide on how to get the submission ID: https://www.jotform.com/help/549-where-to-find-the-submission-id

    I recommend checking with the API team if you have any further questions about the API, you can contact them through this form.

    If you need further assistance, let us know.

  • juliobraz
    Respondido em 27 de março de 2024 às 10:59

    Hello everything is fine?

    I have a problem accessing documents generated via API.


    The links I received I cannot access the correct template.

    For example, I have a fork within the document that can generate 4 different templates, but when I use the "assembled" link with formid and submission, only the file assembled with the same template appears to me, which is sometimes incorrect.


    To make it clearer, I'll give an example from a file I just generated at 11:15 (São Paulo GTM-3 time):


    Link assembled with API data:

    https://www.jotform.com/pdf-submission/5873580630127062179


    Second option you gave me as a link:

    https://www.jotform.com/server.php?action=getSubmissionPDF&sid=5873580630127062179&formID=240454255186659



    You can notice that the Link generated is with the fork of the N4 template in the links above.


    But what I generated the fork is N3, in this case I receive it by email in the correct conditions functionality


    I would like a solution to get the file with the correct template via API.

  • Joeni Jotform Support
    Respondido em 27 de março de 2024 às 14:30

    Hello Julio,

    Thanks for getting back to us. Unfortunately, PDF documents cannot be generated with our API; however, you can automatically receive a PDF version of the submission. Let me walk you through it:

    • On your Form Builder, click on the Settings tab in the orange navigation bar at the top of the page.
    • In the menu on the left side of the page, click on Emails.
    • Hover your mouse over the Notification Email element and click on the Pencil icon.
    • Under the Advanced tab, toggle Attach PDF
    • to the On position, and select the PDF file you created.
    • Now, scroll down, click on Save, and you're done.

    Acessar PDFs Criados via API Image 1 Screenshot 20 We also have a page about Jotform API that you can check out.

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

  • juliobraz
    Respondido em 27 de março de 2024 às 14:44


    Hello Joeni, how are you?

    I believe there was a mistake in your response, currently I can receive the proposal via API, through a link, as the previous attendant advised me, the only thing I need is for the proposal model to be correct, I believe there must be something in the url so I can add it that will make me generate the file correctly. Can you please help me or pass it on to a colleague who would help me with this question.

  • Joeni Jotform Support
    Respondido em 27 de março de 2024 às 15:06

    Hello Julio,

    Thanks for getting back to us. I'm sorry for the confusion on your question. What you can do is you can construct the PDF link manually through API so you can download the PDF file. You can use the following URL to download the PDF file. You are passing the form ID to check specific submission: /submission/{id} which requires you to pass the submission ID. If you need to check any specific submission, you need to pass the submission ID but you are passing the form ID.

    If you need to make an API call to get all the submissions, you need to call the following API: /form/{id}/submissions

    https://api.jotform.com/docs/#form-id-submissions

    Reach out again if you need any other help.