Retrieval of submissions property name using API?

  • RsConsultants
    Asked on March 31, 2016 at 6:27 AM

    Hello,

    We're currently looking at retrieving data from JotForm via the submissions API (http://api.jotform.com/docs/#form-id-submissions).

    We'd like to be able to identify each field in a way that we could translate to a column name or key name on our side.

    We've found that it's possible to provide a name to each field in the field properties section, but this isn't passed through this API endpoint.

    The current data structure for each answer in a form is listed as:

    {
    "text": "This is the label text, and may include user instruction",
    "type": "control_textarea",
    "answer":"This is the user provided answer"
    }

     Would it be possible to add the name to this structure please? For instance:

    {
    "name": "FieldName"
    "text": "This is the label text, and may include user instruction",
    "type": "control_textarea",
    "answer":"This is the user provided answer"
    }

     

    I'd really appreciate any help or information you can provide with this.

    Thanks,
    Andrew

  • Charlie
    Replied on March 31, 2016 at 10:48 AM

    The name property of a field is repetitive. Example, the full name field has a property name "FieldName", in all submissions it will have that same name so I think that's the reason why it is not shown in this API call http://api.jotform.com/docs/#form-id-submissions.

    What you can do is first get all the field property name and create columns from there. You can get the property name of your form fields using this API call: http://api.jotform.com/docs/#form-id-questions

    If you have further questions, we have a dedicated API team that you can email on this address api@jotform.com.

    I hope that helps.

  • RsConsultants
    Replied on March 31, 2016 at 10:57 AM

    Hi Charlie,

    Thanks for your reply. It does certainly make sense in order to reduce the size of the payload returned by the API, though couldn't the same be said for "text" property as well in this case?

    Either way it's good to know there's a way of retrieving the mapping between the answers and the names, so thank you.

    Thank you also for the email for the API team! I tried to contact them directly via the "Contact API team" button on api.jotform.com, but unfortunately it just links to a header at the very bottom of the page and nothing else. On looking at the code, it looks like an embedded JotForm form is meant to be there, but it's been deleted!

    Anyway, many thanks for your help. I'd consider this resolved!

  • Charlie
    Replied on March 31, 2016 at 12:26 PM

    Apologies for the inconvenience. I'll to report the contact form in the API page, although the forum here and for developers are somewhat separate.

    Regarding the "text" property, yes you are correct. Perhaps the API team thought that the "Text" property, which is the label name in the form field, would be a more easily identifiable or readable element rather than the property name.

    I'm glad the other API call will help. We appreciate your feedback, please do feel free to visit us again here in the forum if you need help. Thank you.