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_sdk
Just import the Signaturit Client this way
from signaturit_sdk.signaturit_client import SignaturitClient
Then 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={'data': {'crm_id': 'CUSTOM_ID'}})
response = client.get_signatures(conditions={'ids': ['ID1', 'ID2]})
``
### Count signature requests
Count your signature requests.
```python
response = client.count_signatures()
Get a single signature request.
response = client.get_signature('SIGNATURE_ID')
Get all documents from a signature request.
response = client.get_signature_documents('SIGNATURE_ID')
Get a single document from a signature request.
response = client.get_signature_document('SIGNATURE_ID','DOCUMENT_ID')
Create a new signature request. Check all params.
recipients = [{'fullname': 'Bob', 'email': 'bobsoap@signatur.it'}]
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 = [{'fullname': 'Bob', 'email': 'bobsoap@signatur.it', '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 = [{'fullname': 'Bob', 'email': 'bobsoap@signatur.it'}]
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 = [{'fullname': 'Bob', 'email': 'bobsoap@signatur.it'}]
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 = [{'fullname': 'Bob', 'email': 'bobsoap@signatur.it'}]
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)
Cancel a signature request.
response = client.cancel_signature('SIGNATURE_ID');
Send a reminder email.
response = client.send_signature_reminder('SIGNATURE_ID', 'DOCUMENT_ID');
Get the audit trail of a signature request document and save it in the submitted path.
response = client.download_audit_trail('ID','DOCUMENT_ID','/path/doc.pdf')
Get the signed document of a signature request document and save it in the submitted path.
response = client.download_signed_document('ID','DOCUMENT_ID','/path/doc.pdf')
Retrieve the information of your account.
response = client.get_account()
Get all account brandings.
response = client.get_brandings()
Get a single branding.
response = client.get_branding('BRANDING_ID')
Create a new branding. You can check all branding params here.`
branding_params = {'corporate_layout_color': '#FFBF00',
'corporate_text_color': '#2A1B0A',
'application_texts': {'sign_button': 'Sign!'}
}
response = client.create_branding(branding_params)
Update a single branding.
branding_params = {'application_texts': {'send_button': 'Send!'}}
response = client.update_branding('BRANDING_ID', branding_params)
Change the branding logo.
file_path = '/path/new_logo.png'
response = client.update_branding_logo('BRANDING_ID', file_path)
Change a template. Learn more about the templates here.
file_path = '/path/new_template.html'
response = client.update_branding_email('BRANDING_ID', 'sign_request', file_path)
##Templates
Retrieve all data from your templates.
response = client.get_templates()
##Emails
####Get all certified emails
response = client.get_emails()
####Get last 50 emails
response = client.get_emails(50)
####Navigate through all emails in blocks of 50 results
response = client.get_emails(50, 50)
Count all certified emails
response = client.count_emails()
Get a single email
client.get_email('EMAIL_ID')
Get a single email certificates
client.get_email_certificates('EMAIL_ID')
Get a single email certificate
client.get_email('EMAIL_ID', 'CERTIFICATE_ID')
Create a new certified emails.
response = client.create_email(
[ 'demo.pdf', 'receip.pdf' ],
[{'email': 'john.doe@signaturit.com', 'fullname': 'Mr John'}],
'Python subject',
'Python body',
{}
)
Get the original document of an email request and save it in the submitted path.
response = client.download_email_original_file('EMAIL_ID','CERTIFICATE_ID','/path/doc.pdf')
Get the audit trail document of an email request and save it in the submitted path.
response = client.download_email_audit_trail('EMAIL_ID','CERTIFICATE_ID','/path/doc.pdf')