ScriveClient 1.0.2

Scrive API Client

Unofficial

Install-Package ScriveClient -Version 1.0.2
dotnet add package ScriveClient --version 1.0.2
<PackageReference Include="ScriveClient" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ScriveClient --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Initialize

var scrive = new ScriveApiV2(new ScriveConfigurationV2
{
    ClientIdentifier = "0123456789",
    ClientSecret = "0123456789",
    TokenIdentifier = "0123456789",
    TokenSecret = "0123456789",
    Hostname = "https://api-testbed.scrive.com",
});

New Document / Get Document

var res1 = await scrive.NewDocument(); // .GetDocument("0123456789");

if (res1.Success == false)
{
    // Handle res1.Error...
}

Update Document

res1.Document.Language = "en";
res1.Document.Title = "Test";
res1.Document.Parties.Add(new ScriveDocumentV2Party
{
    IsSignatory = true,
    Fields = new List<ScriveDocumentV2PartiesField>
    {
        new ScriveDocumentV2PartiesField
        {
            Type = "name",
            Order = 1,
            Value = "Firstname",
        },
        new ScriveDocumentV2PartiesField
        {
            Type = "name",
            Order = 2,
            Value = "Lastname",
        },
        new ScriveDocumentV2PartiesField
        {
            Type = "email",
            Value = "api-testbed@scrive.com",
        },
    },
});

var res2 = await scrive.UpdateDocument(res1.Document);

if (res2.Success == false)
{
    // Handle res2.Error...
}

Set Main File

var mainfile = File.ReadAllBytes("MainFile.pdf");
var res3 = await scrive.SetMainFile(res2.Document, mainfile);

if (res3.Success == false)
{
    // Handle res3.Error...
}

Set Author Attachments

var attachment = File.ReadAllBytes("Attachment.pdf");
var res4 = await scrive.SetAuthorAttachments(res3.Document, attachment, "Attachment.pdf");

if (res4.Success == false)
{
    // Handle res4.Error...
}

Start Signing Process

var res5 = await scrive.StartSigningProcess(res4.Document);

if (res5.Success == false)
{
    // Handle res5.Error...
}

Initialize

var scrive = new ScriveApiV2(new ScriveConfigurationV2
{
    ClientIdentifier = "0123456789",
    ClientSecret = "0123456789",
    TokenIdentifier = "0123456789",
    TokenSecret = "0123456789",
    Hostname = "https://api-testbed.scrive.com",
});

New Document / Get Document

var res1 = await scrive.NewDocument(); // .GetDocument("0123456789");

if (res1.Success == false)
{
    // Handle res1.Error...
}

Update Document

res1.Document.Language = "en";
res1.Document.Title = "Test";
res1.Document.Parties.Add(new ScriveDocumentV2Party
{
    IsSignatory = true,
    Fields = new List<ScriveDocumentV2PartiesField>
    {
        new ScriveDocumentV2PartiesField
        {
            Type = "name",
            Order = 1,
            Value = "Firstname",
        },
        new ScriveDocumentV2PartiesField
        {
            Type = "name",
            Order = 2,
            Value = "Lastname",
        },
        new ScriveDocumentV2PartiesField
        {
            Type = "email",
            Value = "api-testbed@scrive.com",
        },
    },
});

var res2 = await scrive.UpdateDocument(res1.Document);

if (res2.Success == false)
{
    // Handle res2.Error...
}

Set Main File

var mainfile = File.ReadAllBytes("MainFile.pdf");
var res3 = await scrive.SetMainFile(res2.Document, mainfile);

if (res3.Success == false)
{
    // Handle res3.Error...
}

Set Author Attachments

var attachment = File.ReadAllBytes("Attachment.pdf");
var res4 = await scrive.SetAuthorAttachments(res3.Document, attachment, "Attachment.pdf");

if (res4.Success == false)
{
    // Handle res4.Error...
}

Start Signing Process

var res5 = await scrive.StartSigningProcess(res4.Document);

if (res5.Success == false)
{
    // Handle res5.Error...
}

  • .NETCoreApp 2.0

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

Version History

Version Downloads Last updated
1.0.2 90 3/5/2019
1.0.1 80 3/4/2019