2 Replies Latest reply on Sep 18, 2015 8:06 AM by havermeyer

    Adding Form Fields to a transient document

    havermeyer Level 1

      Hi,

       

      I'm trying to add Form Fields to an uploaded pdf agreement but I'm not having any luck (and no errors are being reported). Using the java REST api example from adobe, I've created my own documentCreationInfo JSON objects which works fine but the form field I'm trying to include does not appear. Maybe someone can cut and paste an example of their JSON file that they have working? I started by just including only the required parameters in formFields with no luck... and then started adding more.. and still no dice.  Below is what my JSON object looks like.

       

      {

      • "documentCreationInfo":{
        • "recipientSetInfos":[
          1. {
            • "recipientSetRole":"SIGNER",
            • "recipientSetMemberInfos":[
              1. {}
              ]
            }
          ],
        • "signatureFlow":"SENDER_SIGNATURE_NOT_REQUIRED",
        • "name":"Finance Agreement",
        • "signatureType":"ESIGN",
        • "formFields":[
          1. {
            • "receipientIndex":0,
            • "name":"test",
            • "inputType":"TEXT_FIELD",
            • "locations":[
              1. {
                • "pageNumber":"1",
                • "top":"200",
                • "left":"100",
                • "width":"200",
                • "height":"100"
                }
              ],
            • "fontSize":12,
            • "contentType":"SIGNATURE_DATE",
            • "required":true
            }
          ],
        • "fileInfos":[
          1. {
            • "transientDocumentId":"2AAABLblqZhD-x2OOgeSbHKZwwn7OAmwtNJDRQflWX8xxtyPCVaylonbkQRHKILfLhoLZYimMp2b6Ge9bHhz-M7GM I1sH-exNG3CdtQ2wpzdctA3yu6CMblU-h-mLdz-OuTiwi1fPgr6TDXq18HUqy3_n13IO73zW8htYXhr_KHIsBcKSKm hU9fX6GqvNrhUZzFS8iYTWX3E*"
            }
          ],
        • "message":"Please sign this.",
        • "securityOptions":{
          • "passwordProtection":"NONE",
          • "kbaProtection":"NONE",
          • "webIdentiyProtection":"NONE",
          • "externalPassword":"",
          • "portectOpen":false,
          • "internalPassword":"",
          • "openPassword":""
          }
        }

      }

        • 1. Re: Adding Form Fields to a transient document
          javier-pex Level 1

          Hi,

           

          I'm currently building an internal REST client for EchoSign REST API v4, I did manage to create transientDocuments, Agreements and Widgets, for the scenario you describe above you may use the following JSON request:

           

          URL: https://api.echosign.com:443/api/rest/v4/agreements

          Headers request:

          Body Request:

          "documentCreationInfo": {

            "signatureType": "ESIGN",

            "callbackInfo": "https://www.test.com",

            "daysUntilSigningDeadline": "1",

            "recipientSetInfos": [

              {

                "recipientSetMemberInfos": [

                  {

                    "email": "test1@test.com"

                  }

                ],

                "recipientSetRole": "APPROVER"

              },

              {

                "recipientSetMemberInfos": [

                  {

                    "email": "test2@test.com"

                  }

                ],

                "recipientSetRole": "SIGNER"

              },

              {

                "recipientSetMemberInfos": [

                  {

                    "email": "test3@test.com"

                  }

                ],

                "recipientSetRole": "SIGNER"

              }

            ],

            "ccs": [

              "manager1@test.com",

              "manager2@test.com"

            ],

            "externalId": {

              "id": "DOC_REF_0001",

              "group": "group-DOC_REF_0001"

            },

            "signatureFlow": "PARALLEL",

            "formFields": [

              {

                "displayLabel": "Display Label 1",

                "recipientIndex": "1",

                "maxLength": "50",

                "minLength": "1",

                "locations": [

                  {

                    "height": "20",

                    "width": "100",

                    "pageNumber": "1",

                    "left": "50",

                    "top": "50"

                  }

                ],

                "name": "Form field name One",

                "inputType": "TEXT_FIELD",

                "required": "true",

                "defaultValue": "Landlord Full Name",

                "fontSize": "8.0",

                "readOnly": "true",

                "borderWidth": "1.0",

                "tooltip": "Tooltip One"

              },

              {

                "displayLabel": "Display Label 2",

                "recipientIndex": "1",

                "contentType": "SIGNATURE",

                "maxLength": "50",

                "minLength": "1",

                "locations": [

                  {

                    "height": "20",

                    "width": "100",

                    "pageNumber": "1",

                    "left": "155",

                    "top": "50"

                  }

                ],

                "name": "Form field name Two",

                "inputType": "SIGNATURE",

                "required": "true",

                "defaultValue": "",

                "fontSize": "8.0",

                "readOnly": "true",

                "borderWidth": "1.0",

                "tooltip": "Tooltip Two"

              },

              {

                "displayLabel": "Display Label 3",

                "recipientIndex": "2",

                "maxLength": "50",

                "minLength": "1",

                "locations": [

                  {

                    "height": "20",

                    "width": "100",

                    "pageNumber": "1",

                    "left": "50",

                    "top": "105"

                  }

                ],

                "name": "Form field name Three",

                "inputType": "TEXT_FIELD",

                "required": "true",

                "defaultValue": "Tenant Full Name",

                "fontSize": "8.0",

                "readOnly": "true",

                "borderWidth": "1.0",

                "tooltip": "Tooltip Three"

              },

              {

                "displayLabel": "Display Label 4",

                "recipientIndex": "2",

                "contentType": "SIGNATURE",

                "maxLength": "50",

                "minLength": "1",

                "locations": [

                  {

                    "height": "20",

                    "width": "100",

                    "pageNumber": "1",

                    "left": "155",

                    "top": "105"

                  }

                ],

                "name": "Form field name Four",

                "inputType": "SIGNATURE",

                "required": "true",

                "defaultValue": "",

                "fontSize": "8.0",

                "readOnly": "false",

                "borderWidth": "1.0",

                "tooltip": "Tooltip Four"

              },

              {

                "displayLabel": "Display Label 4",

                "recipientIndex": "3",

                "maxLength": "50",

                "minLength": "1",

                "locations": [

                  {

                    "height": "20",

                    "width": "100",

                    "pageNumber": "1",

                    "left": "50",

                    "top": "155"

                  }

                ],

                "name": "Form field name Five",

                "inputType": "TEXT_FIELD",

                "required": "true",

                "defaultValue": "Tenant 2 Full Name",

                "fontSize": "8.0",

                "readOnly": "true",

                "borderWidth": "1.0",

                "tooltip": "Tooltip Five"

              },

              {

                "displayLabel": "Display Label 5",

                "recipientIndex": "3",

                "contentType": "SIGNATURE",

                "maxLength": "50",

                "minLength": "1",

                "locations": [

                  {

                    "height": "20",

                    "width": "100",

                    "pageNumber": "1",

                    "left": "155",

                    "top": "155"

                  }

                ],

                "name": "Form field name Six",

                "inputType": "SIGNATURE",

                "required": "true",

                "defaultValue": "",

                "fontSize": "8.0",

                "readOnly": "false",

                "borderWidth": "1.0",

                "tooltip": "Tooltip Six"

              }

            ],

            "message": "Message document",

            "fileInfos": [

              {

                "transientDocumentId": "YourTransientDocumentID-UwncHGZdosqfXeQ-GEcxF1mkGDUbVQY*"

              }

            ],

            "reminderFrequency": "DAILY_UNTIL_SIGNED",

            "postSignOptions": {

              "redirectDelay": "10",

              "redirectUrl": "https://www.test.com"

            },

            "name": "Agreement name"

          },

          "options": {

            "noChrome": "false",

            "sendThroughWeb": "false",

            "locale": "en_GB",

            "authoringRequested": "false",

            "autoLoginUser": "false"

          }

          }

           

          Hope that helps you.

           

          Regards

          • 2. Re: Adding Form Fields to a transient document
            havermeyer Level 1

            Thanks for the example! I was able to successfully add a text form field based on your JSON example. However, the form field does not appear when I change the contentType to SIGNATURE_DATE. I've tried to play around with displayFormatType and format but still no luck. 

             

            Anyone have an example of a working SIGNATURE_DATE form field?

             

            Thanks,

            Andre