URL : v3/api/post-form-data

Method : POST

Query Parameters : None

Body Parameters :

Parameter Type Possible values Optional/Required Description
category string ticket, user, organisation Required It is the category of the form which  has to be fetched
form-fields array Array of objects Required Form fields which are updated or newly created.

Please read below for detailed explanation

//form fields is an array of objects as shown below. So if a field is updated it is going to send that field with previous id but if a field is newly created, id will be sent as null. So not all fields are required to sent but just the changed one

"form_fields":[

        {

           "id":1,//null in case of a new field created

           "title":"title",

           "pattern":"",//any regex pattern

           "sort_order":1,

           "type":"email",

           "required_for_agent":1,

           "required_for_user":1,

           "display_for_agent":1,

           "display_for_user":1,

           "default":1,

           "media_option":"0",

           "api_endpoint":null,

           "labels_for_form_field":[

              {

                 "id":1,//null if a new field is added

                 "language":"en",

                 "label":"Requester"

              }

           ],

          "labels_for_validation":[

              {

                 "id":1,//null if a new field is added

                 "language":"en",

                 "label":"Requester"

              }

           ],

           "options":[

                   {

                      "id":null,

                      "labels":[//option labels

                      {

                          "id":1,//null if a new field is added

                          "language":"en",

                          "label":"Requester"

                       }],

                     "nodes":[]//in case of nested fields add the same document as above here


                   }
            ]

        }         

     ]

 

Tagged:

Leave a Reply

Your email address will not be published.