This package is a NET wrapper around the Signaturit API. If you didn't read the documentation yet, maybe it's time to take a look here.
In order to execute the test suite:
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat="opencover"
To upload the information to Sonarqube:
dotnet tool install --global dotnet-sonarscanner --version 4.7.1
dotnet sonarscanner begin /o:"signaturit" /k:signaturit_net-sdk /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="YOUR_TOKEN" /s:"$(PWD)/SonarQube.Analysis.xml"
dotnet build
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat="opencover"
dotnet sonarscanner end /d:sonar.login="YOUR_TOKEN"
The recommended way to install the SDK is through project.json.
"dependencies": {
"signaturit": "1.0.0"
}
Then instantiate the Client class passing in your API access token.
string accessToken = "OTllYjUwM2NhYmNjNmJlYTZlNWEzNWYzYmZjNTRiZWI2YjU0ZjUxNzUwZDRjZjEwZTA0ZTFkZWQwZGExNDM3ZQ";
Signaturit.Client client = new Signaturit.Client(accessToken);
Please note that by default the client will use our sandbox API. When you are ready to start using the production environment just get the correct access token and pass an additional argument to the constructor:
Signaturit.Client client = new Signaturit.Client(accessToken, true);
Count your signature requests.
object response = client.countSignatures();
Retrieve all data from your signature requests using different filters.
object response = client.getSignatures();
object response = client.getSignatures(50);
object response = client.getSignatures(100, 0, new { crm_id = "CUSTOM_ID" })
Get the information regarding a single signature request passing its ID.
object response = client.getSignature("a066298d-2877-11e4-b641-080027ea3a6e");
Create a new signature request.
object files = new [] {
"./documents/contracts/receipt250.pdf"
};
object recipients = new [] {
new { name = "Mr John" , email = "[email protected]" }
};
object parameters = new {
subject = "Receipt no. 250",
body = "Please sign the receipt"
};
object response = client.createSignature(files, recipients, parameters);
You can add custom info in your requests
object files = new [] {
"./documents/contracts/receipt250.pdf"
};
object recipients = new [] {
new { name = "Mr John" , email = "[email protected]" }
};
object parameters = new {
subject = "Receipt no. 250",
body = "Please sign the receipt",
data = new {
crm_id = "45673"
}
};
object response = client.createSignature(files, recipients, parameters);
You can send templates with the fields filled
object recipients = new [] {
new { name = "Mr John" , email = "[email protected]" }
};
object parameters = new {
subject = "Receipt no. 250",
body = "Please sign the receipt",
templates = "template_name",
data = new {
widget_id = "default value"
}
};
object response = client.createSignature(files, recipients, parameters);
Cancel a signature request.
object response = client.cancelSignature("a066298d-2877-11e4-b641-080027ea3a6e");
Send a reminder email.
object response = client.sendReminder("a066298d-2877-11e4-b641-080027ea3a6e");
Get the audit trail of a signature request document
string response = client.downloadAuditTrail("a066298d-2877-11e4-b641-080027ea3a6e", "d474a1eb-2877-11e4-b641-080027ea3a6e");
Get the signed document of a signature request document
string response = client.downloadSignedDocument("a066298d-2877-11e4-b641-080027ea3a6e", "d474a1eb-2877-11e4-b641-080027ea3a6e");
Get all account brandings.
object response = client.getBrandings();
Get a single branding.
object response = client.getBranding("6472aad7-2877-11e4-b641-080027ea3a6e");
Create a new branding.
object parameters = new {
layout_color = "#FFBF00",
text_color = "#2A1B0A",
application_texts = new { sign_button = "Sign!" }
};
object response = client.createBranding(parameters);
Update a single branding.
object parameters = new {
application_texts = new { send_button = "Send!" }
};
object response = client.updateBranding("6472aad7-2877-11e4-b641-080027ea3a6e", parameters);
Retrieve all data from your templates.
object response = client.getTemplates();
####Get all certified emails
object response = client.getEmails()
####Get last 50 emails
object response = client.getEmails(50)
####Navigate through all emails in blocks of 50 results
object response = client.getEmails(50, 50)
Count all certified emails
object response = client.countEmails()
Get a single email
object response = client.getEmail("EMAIL_ID")
Create a new certified email.
object files = new [] {
"./demo.pdf",
"./receipt.pdf"
};
object recipients = new [] {
new { name = "Mr John" , email = "[email protected]" }
};
object parameters = new {
subject = "NET subject",
body = "NET body"
};
object response = client.createEmail(files, recipients, "NET subject", "NET body")
Get the audit trail document of an email request.
string response = client.downloadEmailAuditTrail("EMAIL_ID", "CERTIFICATE_ID")