nrehoie

Retrieving SENT packages returns a COMPLETED package

0 votes

Hello, I tried to make an API call to retrieve incomplete SENT packages, but the results included a COMPLETED package along with SENT packages. All COMPLETED pakcages were not returned, just one was.  Here is the call:


Page<DocumentPackage> packagesSent  = eslClient.PackageService.GetPackages(DocumentPackageStatus.SENT, new PageRequest(1,100));

I only want SENT packages.   Why would a COMPLETED package also be returned?  Is there another way to limit the results to just SENT packages?

Thank you

 


Reply to: Retrieving SENT packages returns a COMPLETED package

0 votes

Hello nrehoie,

 

This SDK function "public Page<DocumentPackage> GetPackages(DocumentPackageStatus status, PageRequest request)" should only return you the package with the status of your choice, and shouldn't return you a COMPLETED package in your case.

If you can reproduce the issue, could you share a screenshot of the code and a printed list in the console that includes the the returned packages, so that I can help you check against the backoffice and the code a bit. If you don't want to post here, you can send the information to [email protected].

 

Duo

 

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Retrieving SENT packages returns a COMPLETED package

0 votes

Hello Najib,

 

Sorry for the late reply, I was off last Thursday and Friday.

Codewise, you can always add a secondary check in your code to make sure the package status is expected, so among all the package status:

DocumentPackageStatus.DRAFT;
DocumentPackageStatus.SENT;
DocumentPackageStatus.COMPLETED;
DocumentPackageStatus.ARCHIVED;
DocumentPackageStatus.DECLINED;
DocumentPackageStatus.OPTED_OUT;
DocumentPackageStatus.EXPIRED;

The COMPLETED and ARCHIVED packages shouldn't be deleted, you can use below code:
if (package.Status != DocumentPackageStatus.COMPLETED && package.Status != DocumentPackageStatus.ARCHIVED) {
    //do delete
}

 

From the support perspective, we've already had a support ticket open for this issue, and I will work with our support team to trouble shoot with this issue for you.

 

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