• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[Adobe Sign API] Send agreement with using LibraryDocument

New Here ,
Sep 13, 2022 Sep 13, 2022

Copy link to clipboard

Copied

Good afternoon
Please help with the request to send the agreement, which is created based on the libraryDocument.
What we do:
1. Create a template with fields for the Sender and Recipient.
2. Check that libraryDocument exist:
request
GET https://api.na3.adobesign.com:443/api/rest/v6/libraryDocuments
response
200 OK
{
  "libraryDocumentList": [
    {
      "id": "CBJCHBCAABAA0eW2xqFBRLlfPTMzqQnZHUMADvHl45h6",
      "name": "[DEMO USE ONLY] agr123",
      "creatorEmail": "alukasheva@b2broker.com",
      "ownerEmail": "alukasheva@b2broker.com",
      "modifiedDate": "2022-07-20T13:33:39Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "USER",
      "status": "ACTIVE",
      "hidden": false
    },
    {
      "id": "CBJCHBCAABAAV18OijI25xOzkcpxiHbB0tvuzMToZmWG",
      "name": "[DEMO USE ONLY] b2broker_test",
      "creatorEmail": "alukasheva@b2broker.com",
      "ownerEmail": "alukasheva@b2broker.com",
      "modifiedDate": "2022-09-11T16:46:11Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "ACCOUNT",
      "status": "ACTIVE",
      "hidden": false
    },
    {
      "id": "CBJCHBCAABAAON3stgP5YjurW-JahvCiFUK_Txn87AaU",
      "name": "[DEMO USE ONLY] Doc1",
      "creatorEmail": "alukasheva@b2broker.com",
      "ownerEmail": "alukasheva@b2broker.com",
      "modifiedDate": "2022-08-30T13:58:41Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "USER",
      "status": "ACTIVE",
      "hidden": false
    },
    {
      "id": "CBJCHBCAABAAJqxcrpGx0U27E6UFiVoogzWH2UojGT7n",
      "name": "[DEMO USE ONLY] finalTest",
      "creatorEmail": "alukasheva@b2broker.com",
      "ownerEmail": "alukasheva@b2broker.com",
      "modifiedDate": "2022-09-12T18:52:50Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "USER",
      "status": "ACTIVE",
      "hidden": false
    },
    {
      "id": "CBJCHBCAABAAf68FPl1uu7-NUbdpwp2m0XmOyX0d-306",
      "name": "[DEMO USE ONLY] test1field",
      "creatorEmail": "alukasheva@b2broker.com",
      "ownerEmail": "alukasheva@b2broker.com",
      "modifiedDate": "2022-09-12T17:28:20Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "USER",
      "status": "ACTIVE",
      "hidden": false
    },
    {
      "id": "CBJCHBCAABAA0fYKc4r2bs4fsnxeBQ3mKn2rJJ9b3NrO",
      "name": "[DEMO USE ONLY] win",
      "creatorEmail": "alukasheva@b2broker.com",
      "ownerEmail": "alukasheva@b2broker.com",
      "modifiedDate": "2022-09-13T08:41:40Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "USER",
      "status": "ACTIVE",
      "hidden": false
    },
    {
      "id": "CBJCHBCAABAAByrJqm3YWIE46EaNAX4PhPB5Wm7482gW",
      "name": "I-9 (Employment Eligibility Verification) ver. 10/21/2019",
      "creatorEmail": "forms+na3@echosign.com",
      "ownerEmail": "forms+na3@echosign.com",
      "modifiedDate": "2022-04-26T00:10:34Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "GLOBAL",
      "status": "ACTIVE",
      "hidden": false
    },
    {
      "id": "CBJCHBCAABAAieJn7Vx6O-2KnKiLMzvGMRV56RyBTG0R",
      "name": "test_b2b",
      "creatorEmail": "alukasheva@b2broker.com",
      "ownerEmail": "alukasheva@b2broker.com",
      "modifiedDate": "2022-09-12T08:32:50Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "USER",
      "status": "AUTHORING",
      "hidden": false
    },
    {
      "id": "CBJCHBCAABAAEqiqO6BUms-xfXkceoXWPMDdwq7q8vyS",
      "name": "W-4 2022 (Employee's Withholding Certificate)",
      "creatorEmail": "forms+na3@echosign.com",
      "ownerEmail": "forms+na3@echosign.com",
      "modifiedDate": "2022-04-14T20:32:43Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "GLOBAL",
      "status": "ACTIVE",
      "hidden": false
    },
    {
      "id": "CBJCHBCAABAAg-u-ebmfWHFLIfVHSqIioC2hM0qRPXP-",
      "name": "W-9 (Request for Taxpayer Identification Number) ver. 10/18",
      "creatorEmail": "forms+na3@echosign.com",
      "ownerEmail": "forms+na3@echosign.com",
      "modifiedDate": "2018-12-07T07:45:20Z",
      "templateTypes": [
        "DOCUMENT"
      ],
      "sharingMode": "GLOBAL",
      "status": "ACTIVE",
      "hidden": false
    }
  ],
  "page": {}
}
3. Check Fields for libraryDocument with id = CBJCHBCAABAA0fYKc4r2bs4fsnxeBQ3mKn2rJJ9b3NrO
request
GET https://api.na3.adobesign.com:443/api/rest/v6/libraryDocuments/CBJCHBCAABAA0fYKc4r2bs4fsnxeBQ3mKn2rJ...
response
{
  "fields": [
    {
      "backgroundColor": "",
      "borderColor": "",
      "borderStyle": "SOLID",
      "borderWidth": -1,
      "displayLabel": "",
      "visible": true,
      "inputType": "TEXT_FIELD",
      "tooltip": "",
      "fontColor": "",
      "fontName": "",
      "fontSize": -1,
      "alignment": "LEFT",
      "displayFormat": "",
      "displayFormatType": "DEFAULT",
      "masked": false,
      "maskingText": "*",
      "radioCheckType": "CIRCLE",
      "conditionalAction": {
        "anyOrAll": "ANY",
        "action": "SHOW"
      },
      "contentType": "SIGNER_COMPANY",
      "defaultValue": "",
      "readOnly": false,
      "valueExpression": "",
      "calculated": false,
      "urlOverridable": false,
      "required": true,
      "minLength": -1,
      "maxLength": -1,
      "minValue": -1,
      "maxValue": -1,
      "validationErrMsg": "",
      "validation": "NONE",
      "origin": "AUTHORED",
      "name": "Организация 1",
      "locations": [
        {
          "pageNumber": 1,
          "top": 533.8300170898438,
          "left": 187.9199981689453,
          "width": 212.16001892089844,
          "height": 16
        }
      ],
      "assignee": "recipient0"
    },
    {
      "backgroundColor": "",
      "borderColor": "",
      "borderStyle": "SOLID",
      "borderWidth": -1,
      "displayLabel": "",
      "visible": true,
      "inputType": "TEXT_FIELD",
      "tooltip": "",
      "fontColor": "",
      "fontName": "",
      "fontSize": -1,
      "alignment": "LEFT",
      "displayFormat": "",
      "displayFormatType": "DEFAULT",
      "masked": false,
      "maskingText": "*",
      "radioCheckType": "CIRCLE",
      "conditionalAction": {
        "anyOrAll": "ANY",
        "action": "SHOW"
      },
      "contentType": "SIGNER_TITLE",
      "defaultValue": "",
      "readOnly": false,
      "valueExpression": "",
      "calculated": false,
      "urlOverridable": false,
      "required": true,
      "minLength": -1,
      "maxLength": -1,
      "minValue": -1,
      "maxValue": -1,
      "validationErrMsg": "",
      "validation": "NONE",
      "origin": "AUTHORED",
      "name": "Должность 1",
      "locations": [
        {
          "pageNumber": 1,
          "top": 536.0800170898438,
          "left": 549.9199829101562,
          "width": 212.15997314453125,
          "height": 16
        }
      ],
      "assignee": "recipient1"
    }
  ]
}
5. We create a contract based on a template.
Sending a request:
POST https://api.na3.adobesign.com:443/api/rest/v6/agreements
{
  "fileInfos": [
    {
      "libraryDocumentId": "CBJCHBCAABAA0fYKc4r2bs4fsnxeBQ3mKn2rJJ9b3NrO"
    }
  ],
  "name": "win",
  "participantSetsInfo": [
    {
      "order": 1,
      "role": "SIGNER",
      "memberInfos": [
        {
          "email": "sgrashchenko@b2broker.net"
        }
      ]
    }
  ],
  "mergeFieldInfo": [
    {
      "defaultValue": "info",
      "fieldName": "123456"
    },
    {
      "defaultValue": "something",
      "fieldName": "123456"
    }
  ],
  "signatureType": "ESIGN",
  "state": "DRAFT"
}
response:
201

{
  "id": "CBJCHBCAABAAou98_bWvKWSSAR9BM-8opOVOYlWnLj2U"
}
6. Transfer the contract to the AUTHORING state
request
PUT https://api.na3.adobesign.com:443/api/rest/v6/agreements/CBJCHBCAABAAou98_bWvKWSSAR9BM-8opOVOYlWnLj2...
{
  "state": "AUTHORING",
}
response
204
7. We make a request to receive data under the contract, we see the changes
GET https://api.na3.adobesign.com:443/api/rest/v6/agreements/CBJCHBCAABAAou98_bWvKWSSAR9BM-8opOVOYlWnLj2...
response
200

{
  "originalDocumentsImageUrlsInfo": [
    {
      "documentImageUrlsList": [
        {
          "imageURLs": [
            {
              "url": "https://secure.na3.adobesign.com/document/ci/3AAABLblqZhAV6Qlvr25yeb2HIGitIupfvCI4OUp1eiqeCxeRzAR9IW...",
              "pageNumber": 1
            }
          ],
          "imageSize": "FIXED_WIDTH_675px",
          "imagesAvailable": true
        },
        {
          "imageURLs": [
            {
              "url": "https://secure.na3.adobesign.com/document/ci/3AAABLblqZhCAtGoTg_3bQbiH7fylddzywnxHQC980LEVkHRzOmMpUo...",
              "pageNumber": 1
            }
          ],
          "imageSize": "ZOOM_100_PERCENT",
          "imagesAvailable": true
        },
        {
          "imageURLs": [
            {
              "url": "https://secure.na3.adobesign.com/document/ci/3AAABLblqZhDN-44LMCjqVMMGjyp6dStIKWdf8oT2D8nCh05Yar2iFg...",
              "pageNumber": 1
            }
          ],
          "imageSize": "FIXED_WIDTH_50px",
          "imagesAvailable": true
        },
        {
          "imageURLs": [
            {
              "url": "https://secure.na3.adobesign.com/document/ci/3AAABLblqZhBAT3YIHbBugB91-LkIcRta_aylD6yIs9Vv3DAmF3ChIO...",
              "pageNumber": 1
            }
          ],
          "imageSize": "FIXED_WIDTH_250px",
          "imagesAvailable": true
        }
      ],
      "documentId": "3AAABLblqZhDIOd5JvOYN3cFskg_Yus7H66tKscEN3iKlI9OuO3SC021CYUJzvfk_7RUqVytCa74VtDYg2HNURQJo_7DVTHf4"
    }
  ]
}
8. We make a request to receive a contract by URL, we do not see any changes. 
9. We are trying to send the contract:
  • request
PUT https://api.na3.adobesign.com:443/api/rest/v6/agreements/CBJCHBCAABAAou98_bWvKWSSAR9BM-8opOVOYlWnLj2...
{
  "state": "IN_PROCESS",
}
response
204
10. On ui we see that the status = waiting for prefill, but all fields for Sender with data
Снимок экрана 2022-09-13 в 13.54.00.png
TOPICS
Send documents

Views

207

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation