Syntax at payload for POST and PUT

  • Knut Nysaether
    Asked on September 22, 2016 at 5:16 AM

    Hi!

    Can you tell me the syntax for payload for POST and PUT?

     

    I tray to use this:

    {"7":{"input_3" : "Male noden"}, "7":{"leverandorsEpost" : "knutny@online.no"}}

     

    I got this, but the info do not go inside det record.

    {
      "responseCode": 200,
      "message": "success",
      "content": {
        "7": {
          "submissionID": "250344065402926389",
          "URL": "http://api.jotform.com/submission/250344065402926389"
        }
      },
      "limit-left": 999,
      "duration": "16ms"
    }

     

     

     

  • Rose
    Replied on September 22, 2016 at 8:41 AM

    Thank you for contacting us. 

    However, I'm quite confused about your request. Would you like to export your submission to an external database or an html page, or what else? Could you please provide us some more details? 

    You may also have a look following guidances.

    https://www.jotform.com/help/213-Send-POST-Data-From-JotForm-Using-PHP-in-Custom-Thank-You-Page

    https://www.jotform.com/help/126-How-to-send-Submissions-to-Your-MySQL-Database-Using-PHP

    Waiting for your feedbacks. 

  • MXData
    Replied on September 23, 2016 at 4:53 AM

    We will send customer information to our customers so they can check the information and make any changes and send it back to us. We want to do this using a form at JotForm:


    1: We send customer information from our own customer database to a form of JotForm using API PUT / form / {id} / submissions or POST / form / {id} / submissions.  We receive submission ID and stores it i our database.

    2: JotForm send an email to the customer with data and editing link


    3: Customer use the link and edit their data in the form of JotForm


    4: When the customer is finished editing, he sends the changes using the button "send" in the form.  Here it have been nice that JotForm send a event message.


    5: Our system retrieves updated information using the GET / submission / {id} 

     

    Our problem is that we do not get any data in the submission, probably because we do not know the correct syntax of the payload i point 1.

  • beril JotForm UI Developer
    Replied on September 23, 2016 at 8:14 AM

    Could you provide the full code to us so we can assist more properly? If you contact with our API team they can assist better. please contact with api@jotform.comIf you have any question or issues, please do not hesitate contacting us. We will be glad to assist you. 

  • manutewary
    Replied on October 3, 2016 at 7:10 AM

    Hi Beril,

    We are trying to insert the data in the form whose ID is 62394800164353

    The link we are trying to follow is: POST /form/{id}/submissions

    A few commands that we tried were:

      curl -k -X POST -d "submission[1]=Vaske gulvet" "https://eu-api.jotform.com/form/62394800164353/submissions?apiKey=fe89a1256088e2452cb2a7bd90328e28"

    and

      curl -k -X POST -d "submission[3]=Vaske gulvet" "https://eu-api.jotform.com/form/62394800164353/submissions?apiKey=fe89a1256088e2452cb2a7bd90328e28"

     

    But the submissions do not contain the answers.

    For example, please have a look at the submission 251293132911688020

    It does not contain the answers for any of the values provided.

    Could you please guide us as to what will the correct CURL command for inserting to the above form be?

    Thank you.

    Regards and Best Wishes,

    Manu

     

  • beril JotForm UI Developer
    Replied on October 3, 2016 at 8:37 AM

    Hello Manu,

    First of all, thank you for providing the code. To be honest, I have not much knowledge about that. When I've checked the code it seems it is Ok. However, for best assistance, I suggest contacting with api@jotform.com. They will solve your problem better and faster. Feel free to contact us anytime.

  • manutewary
    Replied on October 3, 2016 at 8:44 AM

    Okay, thank you Beril.

     

    Regards and Best Wishes,

    Manu