Ryan_Coleman

API Call for Documents by Signer

0 votes
Guys - Is there an API call where I can return the document list by signer? I know I can get this information just by doing a GET to the package but that also brings back more than what I need. I can also do the DocumentVisibility API call but then I would have to filter by associated Roles. Is there an API call that will just return a list of documents for that signer?

Approved Answer

Reply to: API Call for Documents by Signer

0 votes
Hi Ryan, There's another API allowing you to retrieve all approvals assigning to a role:
GET /api/packages/{packageId}/signers/{signer_id_or_email}/approvals
Response payload could look like below:
[
    {
        "documentId": "efc058bf9f0c261947c62a8d199be5d5ea6495ca102c8076",
        "approvals":[
        ...
        ]
    },
    {
        "documentId": "default-consent",
        "approvals": [
        ...
        ]
    },
    {
        "documentId": "91a88db05a2f122ab214ef6f5933219658ade8d81b7f1035",
        "approvals": []
    }
]
So if the "approvals" array is not null and empty, the document is for the signer. I think following this API could be easier for you to implement in code. The side effects are, you need to make multiple calls to get information for all signers, and only document IDs are returned through the API. Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: API Call for Documents by Signer

0 votes
Duo, This is exactly what I was looking for!

Reply to: API Call for Documents by Signer

0 votes
Glad to help! :) And I noticed that we didn't mention it in our "Retrieve All Signatures" Guide REST tab, I will fix it ASAP. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


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