Jotform Sign: Using API and exporting existing submissions in JSON format

  • Brink_Brendan
    Asked on June 12, 2024 at 5:40 AM

    I have set up a new sign document to send data and final submission document to a webhook, but i dont know what the variables are called and if they are request or post variables.


    I have tried


    // Convert JSON data to PHP

    $result = $_REQUEST['rawRequest'];


    but its not getting the data so that i can pop it in another system.


    Please advise.

  • Nozomi_K JotForm Support
    Replied on June 12, 2024 at 6:24 AM

    Hi Brink_Brendan,

    Thanks for reaching out to Jotform Support. Since data is sent via POST, can you please use $_POST instead of $result = $_REQUEST['rawRequest'];? You can call both $_POST and $_REQUEST, assign them to variables, print them, or save them to a file as a log. So can you try both $_POST and $_REQUEST and see if you can output to a log file? You might also want to check out this guide about how to post submission data to the thank you page. This is for a thank you page, but the following code can be applied to Webhook as well.

    Let us know if there’s anything else we can help you with.

  • Brink_Brendan
    Replied on June 12, 2024 at 11:55 AM
    hi there
    I have already tried both the POst and Request and nothing is working. Please advise
    thanks
    Brendan
    Sent from my iPhone
    ...
  • Christopher JotForm Support
    Replied on June 12, 2024 at 1:14 PM

    Hi Brendan,

    Here is the result when I used this site as testing for Webhook integration.

    {
    "documentID": "241634778309061",
    "completedDate": "2024-06-12 13:09:36",
    "sentDate": "2024-06-12 13:09:19",
    "hasSigningOrder": "No",
    "signedDocumentID": "241635647101047",
    "signedDocumentTitle": "Sample Agreement",
    "signedDocumentURL": "https://www.jotform.com/uploads/Christopher_T/signed/241635647101047/sign_241635029924054_cloned_a2f960005c4bed0f.pdf",
    "answers": {
    "3": {
    "name": "date3",
    "order": "2",
    "text": "Date",
    "type": "control_datetime",
    "answer": {
    "month": "06",
    "day": "12",
    "year": "2024"
    },
    "prettyFormat": "06/12/2024"
    },
    "7": {
    "name": "name7",
    "order": "4",
    "text": "Name",
    "type": "control_fullname",
    "answer": {
    "first": "test",
    "last": "test"
    },
    "prettyFormat": "test test"
    }
    },
    "participants": [
    {
    "name": "test",
    "email": "test@test.com",
    "role": "Me",
    "type": "owner",
    "answerFields": [
    "5",
    "3",
    "7"
    ],
    "signingOrder": 0
    }
    ]
    }

    Give it a try and let us know how it goes.

  • Brink_Brendan
    Replied on July 1, 2024 at 7:36 PM

    Thank you, is there a way to export all past signed documents into the same JSON format? I can only seem to export to CSV and this format doesnt have the email address field in it.

    Appreciate if you could help me with this.

  • Brink_Brendan
    Replied on July 1, 2024 at 7:39 PM

    Is there a way to API call Jotform, with the Document ID and retrieve the JSON programattically which would include the email address and the URL of the signed document?

  • Raymond JotForm Support
    Replied on July 2, 2024 at 12:05 AM

    Hi Brink_Brendan,

    Thanks for reaching out to Jotform Support. Unfortunately, the feature you're looking for isn't available at Jotform right now. It's not yet possible to export existing Sign Documents submissions into a JSON file or trigger existing Sign Document Submissions' Webhooks. At the same time, using API calls with Jotform Sign is not yet supported.

    We've gone ahead and escalated your request to our developers, but when or if it's developed depends on their workload, how viable it is, and how many other users also request it. If there are any updates, we’ll circle back to this thread and let you know.

    Thanks for your patience and understanding, we appreciate it.

 
Your Answer