OliverH | Posts: 28

Delete or Trash?

0 votes
Hi team, In our workflow, we allow our user to delete their transaction. I found two functions in SDK deletePackage() and trash() So my question is, what's the difference between them, what do you suggest to use? And when I managed to trash a package, it's status is not updated to "trash", can you tell me why? my package id is Sr7BDJsSUV015vIeNr1ezLHaVWY= Thanks

Duo_Liang | Posts: 3776

Reply to: Delete or Trash?

1 votes
Hi Oliver, To answer your question, we'd extend this a little bit. In OneSpan Sign, there're following package status: DRAFT / SENT / COMPLETED / ARCHIVED / DECLINED / OPTED_OUT / EXPIRED As you noticed, there's no "TRASH" or "DELETE", because: 1.For trash, there's a separate attribute named "trashed" in package JSON. If it's set to "true", the package is trashed and you can only find it in Trash Folder while still keeping the original status. And if you set it back to false, the package will be recovered. 2.For delete, it's a "DELETE" request when calling REST api. Once a package is deleted, it no longer stored at OSS, so there's no flag indicating a package is deleted or not. So Java SDK basically does the same thing as we discussed above. Talking to which one is better, it really depends on your own requirement, whether you want to recover the package vs a permanent delete. Hope this could help! Duo

Jin | Posts: 3

Reply to: Delete or Trash?

0 votes
When I request package info on a deleted package, I get back an error saying "Cannot access a deleted package." If the system knows that a package was deleted, my impression is that the package is not completely removed from the system. How much of the package data is retained during a deletion?

Duo_Liang | Posts: 3776

Reply to: Delete or Trash?

1 votes

Hi Jin, If it's deleted, only the packageID is retained with a status of DELETED in OneSpan Sign. Everything else is removed and cannot be reinstated. And on the other hand, TRASHing a package will put it in the TRASH folder before permanently deleted. Hope this could help! Duo


praxedis | Posts: 45

Reply to:

0 votes

In my sandbox, I have packages in my trash that have been there for months and are still accessible and downloadable. Is this normal?


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