REST API method to List Packages by SENDER

0 votes
Hi, We have an application which creates SENDERS (unique email) on the fly if they have never sent any ESL package before. We are using REST API to create a "dashboard" for each of those SENDERS we created and they use their email to login. Can you point out the method (URL) to use to filter the list of packages - similar to when you login to the sandbox developer account using the sender's email, it list the packages the sender created. We are using GET /packages but we can see only packages created by the SENDER who is the Account Owner ... How do we specify, we want those from a different SENDER

Reply to: REST API method to List Packages by SENDER

1 votes
Hi Gotcha, OneSpan Sign do have the capability which allows account owner to retrieve and manage sender's package. Following are two solutions I suggest to use: First, You can use the completion report feature to view all the packages created by your senders. The response payload includes all senders'(including owenr) package information. Or, you can retrieve the api key for your senders through the REST API. And using this api key to retrieve package list just like you retrieve owner's packages. What you’ll need to do is, first retrieve the sender id of each by:
Then, once you have the sender id of each, you can use api below to retrieve the api key of the current sender.
Thanks for your post and hope you find this reply helpful!

Duo Liang OneSpan Evangelism and Partner Integrations Developer

Reply to:

0 votes

Hi Mark,


Could you elaborate a little bit more about the use case you are achieving? Why I am asking is because OneSpan Sign does provide flexible options to search packages. Take this one for example "I know the package ID, I want to know which sender sends this package", you can directly use account owner's API Key, and invoke this API:
GET /api/packages/{packageId}

It returns the detailed package JSON, and the sender information can be found at "sender" node.

In other cases, if you really want to list all the packages created by all the senders, I would suggest to use this flow:

(1)(optional)get a usage report for all senders, so you don't need to query every sender for all package statuses

GET /api/reports/usage?from=2021-01-01&to=2021-11-01

(2)get individual sender API Keys like showcased above

(3)with each sender API Key, list packages created by them (I personally prefer to query each status)

GET /api/packages?from=1&to=100&lastUpdatedStartDate=2021-01-01&lastUpdatedEndDate=2021-11-01&query=sent

GET /api/packages?from=1&to=100&lastUpdatedStartDate=2021-01-01&lastUpdatedEndDate=2021-11-01&query=completed

GET /api/packages?from=1&to=100&lastUpdatedStartDate=2021-01-01&lastUpdatedEndDate=2021-11-01&query=draft

GET /api/packages?from=1&to=100&lastUpdatedStartDate=2021-01-01&lastUpdatedEndDate=2021-11-01&query=archived



(1)draft parameter includes packages of "draft" + "expired" + "declined" + "opted_out" statuses

(2)trashed packages are not included, they can be listed by parameter "query=trashed" 



Duo Liang OneSpan Evangelism and Partner Integrations Developer

Reply to: REST API method to List Packages by SENDER

0 votes

Yes thank you, GET /api/packages/{packageId} returns what I required.

Mark knollin

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