This topic contains 2 replies, has 2 voices, and was last updated by  r_bakker_sping_nl 1 week, 2 days ago.

  • Author
    Posts
  • Participant
    r_bakker_sping_nl
    Newbie
    Member since: 04.04.2018
    Number of posts: 5

    Hi,

    We have been trying to sign all documents using the canadian REST API (e-signlive.ca/api)

    We tried creating a package with the code provided on https://developer.esignlive.com/guides/feature-guides/sign-documents/ .

    We added a role (‘Sender’) and approval for this role.

    {
      "name":"Contract B J R",
      "description":"",
      "roles":[
         {
            "id":"SignerContract",
            "type":"SIGNER",
            "signers":[
               {
                  "firstName":"B J",
                  "lastName":"R",
                  "email":"sping+development+1@gmail.com",
                  "delivery":{
                     "email":false
                  },
                  "auth":{
                     "scheme":"NONE"
                  }
               }
            ]
         },
         {
            "id":"Sender",
            "type":"SIGNER",
            "signers":[
               {
                  "firstName":"sender.firstname",
                  "lastName":"sender.lastname",
                  "email":"sping+development@gmail.com"
               },
               {
                  "auth":{
                     "scheme":"NONE"
                  }
               }
            ],
            "name":"Sender"
         }
      ],
      "documents":[
         {
            "name":"Contract",
            "id":"Contract",
            "approvals":[
               {
                  "role":"SignerContract",
                  "fields":[
    
                  ]
               },
               {
                  "role":"Sender",
                  "fields":[
    
                  ]
               }
            ]
         }
      ],
      "settings":{
         "ceremony":{
            "inPerson":false
         }
      },
      "visibility":"ACCOUNT",
      "type":"PACKAGE",
      "due":null,
      "autocomplete":true,
      "emailMessage":"",
      "status":"DRAFT",
      "language":"nl"
    }
    

    Sending a POST to /api/packages/{packageId}/documents/signed_documents (using API key)

    {
      "documents":[
         {
            "id":"Contract",
            "name":"Contract"
         }
      ]
    }
    

    Results in 200 OK response without content, but it doesn’t seem to sign anything (for any recipients).

    What should we be doing?

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 608

    Score

    0

    Hi there,

    “Sign Documents” API only programmatically signed signatures for Sender of the package.

    In order to sign documents for a Signer (signer with id of “sender” in your case), you’d follow this guide “Bulk Sign For a Signer” in three steps:
    #1. generate an authentication token for signer
    #2. generate a session token out of this authentication token
    #3. call the same API as you did, but put session token in cookie header as credential in stead of api key.

    Hope this could help!
    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    Participant
    r_bakker_sping_nl
    Newbie
    Member since: 04.04.2018
    Number of posts: 5

    Score

    0

    Hi Duo Liang,

    Thanks for the guidance – we managed to get is working.

    regards,

    Robert

You must be logged in to reply to this topic.