gbaskar.cs | Posts: 1

Retrieve Package Id

0 votes

HI,

How should I get package Id in E-sign call back? I am working with .NET MVC. 

 

Thanks,

Baskar G

 


Duo_Liang | Posts: 3776

Reply to: Retrieve Package Id

0 votes

Hi Baskar,

 

Thanks for your post! Per your question, are we talking about getting package ID when package creation or callback handling?

If the former, package ID is returned at the package creation call:

SDK:

            PackageId packageId2 = eslClient.CreatePackageOneStep(superDuperPackage);
REST API:

            var response = httpClient.PostAsync(new Uri(API_URL) + "/packages/", jsonContent).Result;
            Common.WriteToDebug("Package Id: " + response.Content.ReadAsStringAsync().Result);

 

If you are interested in callback handling, whenever an event of your interest(for example, a package has been completed), OneSpan Sign system sends a POST call to your callback listener, with payload similar to below:

{
  "@class": "com.silanis.esl.packages.event.ESLProcessEvent",
  "name": "PACKAGE_COMPLETE",
  "sessionUser": "0787be84-f095-44c7-ba00-787093df86fc",
  "packageId": "KHiRfOXgKK0gpVWwwpFOSNy6o34=",
  "message": null,
  "documentId": null
}

where you are parse the package ID out of it.

 

Duo


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