Skip to main content

Retrieving Document ID via API

Comments

5 comments

  • Danielle Morley

    Hi Tony,

    There is no way to retrieve a list of document ID's through the API at this time

    You may already know this part, but I'll clarify just in case -- the "document_id" is the the ID of the PDF template, not the individual PDF document generated from an individual form submission.   That template is set up once, and re-used for every form submission -- so really you only need one ID, ever.  

    Does that help?

    0
  • Danielle Morley

    Hi Tony,

    A few more points.

    That Document ID never changes in our system, even if that template is updated in any way -- so it's a very safe thing to embed in a script. 

    Another option --  just using "api.prontoforms.com/api/[version]/data/[id].pdf"  to retrieve a PDF will work -- but we only recommend doing this if you only have one PDF template attached to the form, not multiple.

    Lastly, depending on what you are connecting to, you could also use our HTTP POST destination to send the PDF document, rather than doing an API call to retrieve it -- it would be specified on the web portal side which PDF to use, so there is no ID to handle.

     

     

    0
  • Elizabeth Allison

    Thanks for the details, Danielle!  I did not see that the ID is the same as the template, so that's my solution.  There will be only one PDF/document for the form.

    For the HTTP POST destination, from what I can see, there isn't a "if this destination is successful, perform another one".  So there's a timing issue with the data entering that system, and the document coming into it.  So the easiest way for me is, on successful data insertion, retrieve the PDF.

    0
  • Danielle Morley

    Tony,

    Glad there is an option that works for you!

    Yes, at this time our destinations operate parallel/independently of each other.   You can set up rules as to when a destination executes, but it is all based on data in the form, rather than on other parts of your solution (like destinations).

    That's a good concept, though -- we'll keep that idea in mind for future development.  

    0
  • Danny Williams

    Can you use the Destination Response Outputs to help with this?  We do something that sounds similar... 

    We use Data Destination #1 to create an activity in our remote system.  (but we cannot attach a pdf to it in the "create" call)

    We then use the ID of the activity that was created from the response output of the first data destination and we use it for Data Destination #2 to attach the pdf file to that activity.

     

    More information can be found here:  https://support.prontoforms.com/hc/en-us/articles/360029070591-Destination-Response-Outputs

    0

Please sign in to leave a comment.