savantm | Posts: 2

Can't find document id

0 votes
Hello, I am trying to find a way to get a document id. I am currently using a GET to retrieve a template ID that I made ahead of time, and then a POST to clone this template for a new transaction. I am not seeing any specfics on how I can find the document id after doing this. Any suggestions?

Approved Answer
harishaidary | Posts: 1812

Reply to: Can't find document id

1 votes
Hi there, After you've created your package from your template, you can simply do a GET https://sandbox.esignlive.com/api/packages/{packageId} and look for the id under the "documents" array.

harishaidary | Posts: 1812

Reply to: Can't find document id

0 votes
Just as an fyi, you can also assign custom ids in esignlive through the SDKs/API to make retrieval of data easier.

savantm | Posts: 2

Reply to: Can't find document id

0 votes
Thank you for the quick response. I'm now trying to update the document to be consent only. I am attempting to use a PUT to https://sandbox.esignlive.com/api/packages/{packageID}/documents/{documentID} with the following code: { "status": "", "description": "", "id": "{documentID}", "data": { "ese_document_texttag_extract_needed": "false" }, "approvals": [ { "role": "Signer", "firstName": "First", "lastName": "Last", "email": "[email protected]" } ], "pages": [ { "id": "", "height": 1030, "width": 796, "left": 0, "top": 0, "version": 0, "index": 0 } ], "external": null, "extract": false, "signedHash": null, "signerVerificationToken": null, "fields": [], "index": 0, "name": "{documentname}", "isConsent": true, "size": 18937 } I am receiving an error saying "error.validation.validateApproval.noRolesOnApproval". Could you advise on what I am doing incorrectly?

harishaidary | Posts: 1812

Reply to: Can't find document id

0 votes
I followed this guide and I was able to update a document to a consent: https://developer.esignlive.com/guides/feature-guides/create-consent-document/#rest-api i.e. PUT https://sandbox.esignlive.com/packages/{packageId}/documents/{documentId} with the following payload:
{
      "approvals": [
        {
          "role": "signer1",
          "name": ""
        }
      ],
      "index": 1,
      "name": "Sample consent",
      "isConsent": true
    }

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off