Signing

Use Signicat Viewer with Signicat archive

283 views August 3, 2017 October 9, 2017 4

Using C#
public void How_to_create_a_simple_document_order_to_view_sdo_from_archive()
 {
     // The archive id is what you get in return in the resulturl when a document is signed and completed
     // A signing task needs to have sendresulttoarchive=true if you want a document to be stored in the archive

     string archiveid = "150720145ozj6238uwo46zks8bymapzualsj2cme7asvuyhqk9t2iuq4dn";
     var request = new createrequestrequest
     {
         password = "Bond007",
         service = "demo",
         request = new request[]
  {
      new request
      {
          clientreference = "cliref1",
          language = "da",
          profile = "demo",
          document = new document[]
          {
              new archivedocument
              {
                  id = "doc_1",
                  refarchiveid = archiveid
              }
          },
          task = new task[]
          {
              new task
              {
                  bundle = false,
                  bundleSpecified = true, // this property is generated by visual studio, must be set to true to enable nullable types
                  id = "viewtask_1",
                  subjectref = "subj_1",
                  documentaction = new documentaction[]
                  {
                       new documentaction
                       {
                           type = documentactiontype.view,
                           documentref = "doc_1"
                       }
                  },
                  signature = new signature[]
                  {
                      new signature
                      {
                          method = new string[]
                          {
                              "viewer"
                          }
                      }
                  }
              }
          }
      }
  }
     };
     createrequestresponse response;
     using (var client = new DocumentEndPointClient())
     {
         response = client.createRequest(request);
     }
     String viewDocumentHereUrl =
         String.Format("https://preprod.signicat.com/std/docaction/demo?request_id={0}&task_id={1}", response.requestid[0], request.request[0].task[0].id);
     Console.WriteLine(viewDocumentHereUrl);
     Assert.IsNotNull(response);
     Assert.IsNull(response.artifact);
     Assert.IsNotNull(response.requestid);
 }

Was this helpful?