KKrumbine

Retrieving packages for all senders using the API key and .NET SDK

0 votes
Should I be able to view current packages for all senders under the same account using the API key and .NET SDK? I have created a Sandbox account with an additional sender and can successfully create a new package in DRAFT passing only the secondary account as the sender. If i then execute eslClient.PackageService.GetPackages(DocumentPackageStatus.DRAFT, new PageRequest(0)) my resulting collection count is 0. Doesn't the API key have full access to the child senders under the account? Any assistance would be appreciated!

Reply to: Retrieving packages for all senders using the API key and .NET SDK

0 votes
Hi there, You can use the completion report to view all the packages created by your senders: https://developer.esignlive.com/guides/feature-guides/completion-report/. If you simply use:
eslClient.PackageService.GetPackages(DocumentPackageStatus.DRAFT, new PageRequest(0));
Then, you will be returned only the packages created under the main account owner.
Haris Haidary OneSpan Technical Consultant

Reply to: Retrieving packages for all senders using the API key and .NET SDK

0 votes
Sorry for the delayed response. Thanks Harris for the very quick response, your answer was exactly what I was looking for! -Keith

Reply to: Retrieving packages for all senders using the API key and .NET SDK

0 votes
Is there a way to retrieve all packages for a given sender instead of all packages for the account?

Reply to: Retrieving packages for all senders using the API key and .NET SDK

0 votes
Hi amcdowell, There're few ways to do so: #1. if you want to use the Completion Report feature, there's an overwrite function in ReportService:
public string DownloadCompletionReportAsCSV(Silanis.ESL.SDK.DocumentPackageStatus packageStatus, String senderId, DateTime from, DateTime to)
Which allows you to input a sender ID as the parameter. #2. if you want to retrieve the complete Package Metadata instead of the Completion Report, you can: - First, retrieve your sender's API KEY by this API call (using your owner's API KEY):
GET /api/account/senders/{senderId}/apiKey
Currently, this function is not available in the SDK, but I can create some sample code using REST method in .NET if you want. - Then use this API KEY to create a new EslClient object and call the function
 public Page GetPackages(DocumentPackageStatus status, PageRequest request)
Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Retrieving packages for all senders using the API key and .NET SDK

0 votes
Hey Duo_Liang! Any update about "Currently, this function is not available in the SDK..."? I would like to GetAllPackages from all senders under Main Account, I was hooping to find something like eslClient.PackageService.GetUpdatedPackagesWithinDateRange(DocumentPackageStatus.COMPLETED, (new PageRequest(1, 50)), DateTime.Now.AddDays(-60), DateTime.Now) for ALL our like you said, get each sender’s API KEY and then use the specific eslClient.... all of this in SDK.

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