This package is a wrapper for Signaturit Api. If you didn't read the documentation yet, maybe it's time to take a look here.
You can install the package through pip.
sudo pip install signaturit_sdkJust import the Signaturit Client this way
from signaturit_sdk.signaturit_client import SignaturitClientThen you can authenticate yourself using your AuthToken
client = SignaturitClient('TOKEN')Remember, the default calls are made to our Sandbox server. If you want to do in production, just set the flag when you do the call.
client = SignaturitClient('TOKEN', SignaturitClient.PRODUCTION)Retrieve all data from your signature requests using different filters.
response = client.get_signatures()response = client.get_signatures(limit=50)response = client.get_signatures(limit=50, offset=50)response = client.get_signatures(conditions={'status': 3})response = client.get_signatures(conditions={'since': '2014-7-20', 'status': 3})response = client.get_signatures(conditions={'crm_id': 'CUSTOM_ID'})response = client.get_signatures(conditions={'ids': ['ID1', 'ID2]})response = client.count_signatures()response = client.get_signature('SIGNATURE_ID')Create a new signature request. You can check all signature params.
recipients = [{'name': 'Bob', 'email': '[email protected]'}]
sign_params = {'subject': 'Receipt number 250', 'body': 'Please, can you sign this document?'}
file_path = '/documents/contracts/125932_important.pdf'
response = client.create_signature(file_path, recipients, sign_params)You can enable the security mode, by setting the recipient phone.
recipients = [{'name': 'Bob', 'email': '[email protected]', 'phone': 'XXXXX}]'}]Then, the user will receive a SMS in the phone number with a security code, needed to begin the sign process.
And if you have some templates created, you can use them too.
recipients = [{'name': 'Bob', 'email': '[email protected]'}]
sign_params = {'subject': 'Receipt number 250', 'body': 'Please, can you sign this document?', 'templates': ['id1',...]}
file_path = []
response = client.create_signature(file_path, recipients, sign_params)You can send templates with the fields filled
recipients = [{'name': 'Bob', 'email': '[email protected]'}]
sign_params = {'subject': 'Receipt number 250', 'body': 'Please, can you sign this document?', 'templates': {'TEMPLATE_ID'}, 'data': {'WIDGET_ID': 'DEFAULT_VALUE'}}
response = client.create_signature({}, recipients, sign_params)You can add custom info in your requests
recipients = [{'name': 'Bob', 'email': '[email protected]'}]
sign_params = {'subject': 'Receipt number 250', 'body': 'Please, can you sign this document?', 'data': {'crm_id': '45673'}}
file_path = '/documents/contracts/125932_important.pdf'
response = client.create_signature(file_path, recipients, sign_params)response = client.cancel_signature('SIGNATURE_ID');response = client.send_signature_reminder('SIGNATURE_ID');Get the audit trail of a signature request document
response = client.download_audit_trail('SIGNATURE_ID','DOCUMENT_ID')Get the signed document of a signature request document
response = client.download_signed_document('SIGNATURE_ID','DOCUMENT_ID')Get all account brandings.
response = client.get_brandings()Get a single account branding.
response = client.get_branding('BRANDING_ID')Create a new account branding. You can check all branding params.`
branding_params = {'layout_color': '#FFBF00',
'text_color': '#2A1B0A',
'application_texts': {'sign_button': 'Sign!'}
}
response = client.create_branding(branding_params)Update a single account branding
branding_params = {'application_texts': {'send_button': 'Send!'}}
response = client.update_branding('BRANDING_ID', branding_params)Retrieve all data from an accounts templates.
response = client.get_templates()Get all certified emails
response = client.get_emails()response = client.get_emails(50)response = client.get_emails(50, 50)Count all certified emails
response = client.count_emails()Get a single email
client.get_email('EMAIL_ID')Create a new certified emails.
response = client.create_email(
[ 'demo.pdf', 'receipt.pdf' ],
[{'email': '[email protected]', 'name': 'Mr John'}],
'Python subject',
'Python body',
{}
)Get the audit trail document of an email request
response = client.download_email_audit_trail('EMAIL_ID','CERTIFICATE_ID')response = client.get_sms()response = client.get_sms(50)response = client.get_sms(50, 50)response = client.count_sms()client.get_single_sms('SMS_ID')response = client.create_sms(
[],
[{'phone': '34123456', 'name': 'Mr John'}],
'Python body',
{}
)Get the audit trail document of an sms request
response = client.download_sms_audit_trail('SMS_ID','CERTIFICATE_ID')response = client.get_users()response = client.get_user(USER_ID)response = client.invite_user('[email protected]', 'admin')response = client.change_role(USER_ID, 'member')response = client.remove_user(USER_ID)response = client.get_groups()response = client.get_group(GROUP_ID)response = client.crate_group('SDK group')response = client.update_group(GROUP_ID, 'SDK updated group')response = client.delete_group(GROUP_ID)response = client.add_manager_to_group(GROUP_ID, USER_ID)response = client.add_member_to_group(GROUP_ID, USER_ID)response = client.remove_manager_from_group(GROUP_ID, USER_ID)response = client.remove_members_from_group(GROUP_ID, USER_ID)response = client.get_subscriptions()response = client.get_subscription(SUBSCRIPTION_ID)response = client.create_subscription('https://example_url.json', ['email_delivered'])response = client.update_subscription(subscription_id=SUBSCRIPTION_ID, url='https://new_example_url.json')response = client.delete_subscription(SUBSCRIPTION_ID)response = client.get_contacts()response = client.get_contact(CONTACT_ID)response = client.create_contact('[email protected]', 'bob')response = client.update_contact(contact_id=CONTACT_ID, name='Bob')response = client.delete_contact(CONTACT_ID)