How can I get a currently submission Id at the moment that I clicked submit through API?

  • casecrush
    Asked on August 13, 2018 at 7:42 PM

    I try to get submission id  at the moment that I clicked submit button through API. However, what I got from API is the list of submissions. I do not know which one is the form currently submitted. I could sort submission list by the last day modified but in the case that multiple people submit the form same time, it does not work well.

    Could you tell me how I get submission Id right the time I clicked submit button?

    p/s:   I do not want to get any information from my email by my code. 

  • Jan
    Replied on August 13, 2018 at 8:59 PM

    I recommend you check our API Documentation. For the submission ID, you will see the GET, POST and Delete method. Here's the link: https://api.jotform.com/docs/#submission-id.

    153420812108 14 7avtn Screenshot 10

    If you have any issues, please contact our API team at api@jotform.com.

    We also have Webhooks here in JotForm, please check the guides below:

    How-to-Setup-a-Webhook-with-JotForm
    Webhook-PHP-Script-Examples

    Hope that helps. Let us know if you have any questions. Thank you.

  • casecrush
    Replied on August 14, 2018 at 12:27 PM

    Thank you for your help, but the API you linked appears to only deal with the contents of a submission when given a submission ID. In this case, I would need to know the submission ID before using the API. What I need is the ability to get the submission ID immediately after submitting a form.

    For example, upon submitting a form (creating a new submission), I want to retrieve the ID of that specific submission without needing to parse the list of all the submissions for that form.

  • Nik_C
    Replied on August 14, 2018 at 1:34 PM

    You could try using send post data to thank you page, and then use some PHP script to parse that particular submission's ID, you can check this test form, feel free to submit it:

    https://form.jotform.com/82255679711969

    The data will be like this:

    1534268018Screen Shot 2018 08 14 at 7 Screenshot 10

    Could something like that work for you?



  • casecrush
    Replied on August 14, 2018 at 3:45 PM

    That works, thank you so much!

    One more question: Is there a method in the API that will repopulate the fields of a form with the answers from a given submission?
  • Elton Support Team Lead
    Replied on August 14, 2018 at 5:23 PM

    We will answer your other question here https://www.jotform.com/answers/1553212