How to place form-fields in a document using REST API?

Objective

How to place form-fields in a document using REST API?

Environment

Adobe Sign REST API Swagger Application

Steps

Following are the steps to cplace form-fields in a document using REST API:

  1. Log in to Adobe Sign.

  2. Navigate to  Account>Adobe Sign API>API Information and click REST API Method Documentation.

    000205794-1
  3. POST /transientDocuments and upload a file and create a transient Document ID.

  4. Copy the transient Document ID and use it in the POST /agreements method. Mention the following JSON request in the box:

    {
        "documentCreationInfo": {
            "recipientSetInfos": [{
                    "recipientSetRole": "SIGNER",
                    "recipientSetMemberInfos": [{
                        "email": "test1@gmail.com"
                    }],
                    "privateMessage": "Hello 1"
                },
                {
                    "recipientSetRole": "SIGNER",
                    "recipientSetMemberInfos": [{
                        "email": "test2@gmail.com"
                    }],
                    "privateMessage": "Hello 2"
                }
            ],
            "signatureType": "ESIGN",
            "message": "Please review and sign this document.",
            "signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED",
            "name": "Demo1",
            "fileInfos": [{
                "transientDocumentId": "XXXXXXXXXX"
            }],
            "formFields": [{
                    "hidden": "1",
                    "defaultValue": "test1@gmail.com",
                    "name": "Signer Email (Applicant-1)",
                    "inputType": "TEXT_FIELD",
                    "readOnly": true,
                    "locations": {
                        "pageNumber": 1,
                        "top": 100,
                        "left": 100,
                        "width": 100,
                        "height": 30
                    },
    
                    "contentType": "SIGNER_EMAIL"
                },
                {
                    "name": "Signature (Applicant-2)",
                    "inputType": "SIGNATURE",
                    "locations": {
                        "pageNumber": 1,
                        "top": 520,
                        "left": 162,
                        "width": 280,
                        "height": 30
                    },
                    "contentType": "SIGNATURE",
                    "required": 1,
                    "recipientIndex": 1
                },
                {
                    "name": "Signature (Applicant-3)",
                    "inputType": "SIGNATURE",
                    "locations": {
                        "pageNumber": 2,
                        "top": 312,
                        "left": 154,
                        "width": 280,
                        "height": 30
                    },
                    "contentType": "SIGNATURE",
                    "required": 1,
                    "recipientIndex": 1
                },
                {
                    "defaultValue": "017/09/2018",
                    "displayFormatType": "DATE",
                    "name": "Signature Date (Applicant-4)",
                    "format": "DATE_DD_MM_YYYY",
                    "inputType": "TEXT_FIELD",
                    "readOnly": true,
                    "locations": {
                        "pageNumber": 2,
                        "top": 260,
                        "left": 90,
                        "width": 80,
                        "height": 30
                    },
                    "contentType": "DATA",
                    "required": 1,
                    "recipientIndex": 1
                },
                {
                    "name": "Signature (Applicant-5)",
                    "inputType": "SIGNATURE",
                    "locations": {
                        "pageNumber": 3,
                        "top": 199,
                        "left": 179,
                        "width": 276,
                        "height": 30
                    },
                    "contentType ": "SIGNATURE",
                    "required": 1,
                    "recipientIndex": 1
                },
                {
                    "contentType": "SIGNATURE_DATE",
                    "defaultValue": "06/07/2018",
                    "displayFormatType": "DATE",
                    "name": "Signature Date (Applicant-6)",
                    "format": "DATE_DD_MM_YYYY",
                    "inputType": "TEXT_FIELD",
                    "readOnly": true,
                    "locations": {
                        "pageNumber": 3,
                        "top": 188,
                        "left": 488,
                        "width": 76,
                        "height": 25
                    },
                    "required": 1,
                    "recipientIndex": 1
                },
                {
                    "name": "Signature (Applicant-7)",
                    "inputType": "SIGNATURE",
                    "locations": {
                        "pageNumber": 3,
                        "top": 370,
                        "left": 37,
                        "width": 210,
                        "height": 26
                    },
                    "contentType ": "SIGNATURE",
                    "required": 1,
                    "recipientIndex": 2
                },
                {
                    "contentType ": "SIGNATURE_DATE",
                    "defaultValue": "01/02/2018",
                    "name": "Signature Date (Applicant-8)",
                    "locations": {
                        "pageNumber": 3,
                        "top": 370,
                        "left": 300,
                        "width": 76,
                        "height": 26
                    },
                    "required": 1,
                    "recipientIndex": 2
    
                }
            ]
        }
    }
  5. To execute the JSON Request, click the Try It Out button.

    000205794-2

    The correct JSON returns the response with the agreement ID.

    000205794-3

Additional information

It is the test call for placing form-fields on a specific location using the default REST API documentation. You can use the same JSON code in your own application as per your requirement.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy