Package: signnow-python-sdk
SignNowSignNow Python SDKAbout SignNowSignNow is a powerful web-based e-signature solution that streamlines the signing process and overall document flow for businesses of any size. SignNow offers SaaS as well as public and private cloud deployment options using the same underlying API. With SignNow you can easily sign, share and manage documents in compliance with international data laws and industry-specific regulations. SignNow enables you to collect signatures from partners, employees and customers from any device within minutes.API Contact InformationIf you have questions about the SignNow API, please visit [https://help.signnow.com/docs](https://help.signnow.com/docs) or email [api@signnow.com](mailto:api@signnow.com).See additional contact information at the bottom.InstallationTo install to Python library:pip install signnow-python-sdkOr clone the SignNow library and extract it into the location of your
choice.Navigate to the extracted file and run the following:python setup.py installSetupimportsignnow_python_sdksignnow_python_sdk.Config(client_id="YOUR_CLIENT_ID",client_secret="YOUR_CLIENT_SECRET",environment="production")Environments:production-https://api.signnow.comeval-https://api-eval.signnow.comExamplesTo run the examples you will need an API key. You can get one here [https://www.signnow.com/api](https://www.signnow.com/api). For a full list of accepted parameters, refer to the SignNow REST Endpoints API guide: [https://help.signnow.com/docs](https://help.signnow.com/docs).OAuth2Request OAuth Tokenaccess_token=signnow_python_sdk.OAuth2.request_token("YOUR USERNAME","YOUR PASSWORD")Verify OAuth Tokenaccess_token_verify=signnow_python_sdk.OAuth2.verify(AccessToken)UserCreate New Usernew_user=signnow_python_sdk.User.create("name@domain.com","newpassword","Firstname","Lastname")Retreive User Account Informationsn_user=signnow_python_sdk.User.get(access_token)DocumentGet Document# without annotationsdocument_data=signnow_python_sdk.Document.get(access_token,"YOUR_DOCUMENT_ID")# with annotationsdocument_data=signnow_python_sdk.Document.get(access_token,"YOUR_DOCUMENT_ID",True)Create New Documentdir_path=os.path.dirname(os.path.realpath(__file__))+'/testing123.pdf'doc_id=signnow_python_sdk.Document.upload(access_token,dir_path,False)Create New Document and Extract the Fieldsdir_path=os.path.dirname(os.path.realpath(__file__))+'/testing123.pdf'doc_id=signnow_python_sdk.Document.upload(access_token,dir_path)Update Documentupdate_payload={"texts":[{"size":22,"x":61,"y":72,"page_number":0,"font":"Arial","data":"a sample text element","line_height":9.075,"client_timestamp":datetime.now().strftime("%s")}],fields:[{"x":10,"y: 10,"width":122,"height":34,"page_number":0,"role":"Buyer","required":True,"type":"signature"}]}update_doc_res=signnow_python_sdk.Document.update(access_token,doc_id,update_payload)Delete Documentdelete_doc_res=signnow_python_sdk.Document.delete(access_token,doc_id)Download Document# without historydownload_doc_res=signnow_python_sdk.Document.download(access_token,"YOUR DOCUMENT ID","/","sample")# with historydownload_doc_res=signnow_python_sdk.Document.download(access_token,"YOUR DOCUMENT ID","/","sample",True)Send Free Form Inviteinvite_payload=new{"from":"account_email@domain.com","to":"name@domain.com"}freeform_invite_res=signnow_python_sdk.Document.invite(access_token,"YOUR DOCUMENT ID",invite_payload)Send Role-based Inviteinvite_payload={"to":[{"email":"name@domain.com","role_id":"","role":"Role 1","order":1,"authentication_type":"password","password":"SOME PASSWORD","expiration_days":15,"reminder":5},{"email":"name@domain.com","role_id":"","role":"Role 2","order":2,"authentication_type":"password","password":"SOME PASSWORD","expiration_days":30,"reminder":10}],"from":"your_account_email@domain.com","cc":["name@domain.com"],"subject":"YOUR SUBJECT","message":"YOUR MESSAGE"};role_based_invite_res=signnow_python_sdk.Document.invite(access_token,"YOUR DOCUMENT ID",invite_payload)Cancel Invitecancel_invite_res=signnow_python_sdk.Document.cancel_invite(access_token,"YOUR DOCUMENT ID");Merge Existing Documentsmerge_doc_payload={"name":"My New Merged Doc","document_ids":["YOUR DOCUMENT ID","YOUR DOCUMENT ID"]}merge_doc_res=signnow_python_sdk.Document.merge_and_download(access_token,mergeDocsObj,"/","sample-merge");Document Historydoc_history_res=signnow_python_sdk.Document.get_history(access_token,"YOUR DOCUMENT ID");TemplateCreate Templatenew_template_res=signnow_python_sdk.Template.create(access_token,"YOUR DOCUMENT ID","My New Template");Copy Templatecopy_template_res=signnow_python_sdk.Template.copy(access_token,"YOUR TEMPLATE ID","My Copy Template Doc");FolderFiltersValuessigning-statuswaiting-for-me,waiting-for-others,signed,pendingdocument-updateddatetime.now().strftime("%s")document-createddatetime.now().strftime("%s")SortValuesdocument-nameasc/descupdatedasc/desccreatedasc/descGet users root folderroot_folder_Res=signnow_python_sdk.Folder.root_folder(access_token);Get Folderget_folder_res=signnow_python_sdk.Folder.get(access_token,"YOUR FOLDER ID");WebhookCreate WebhookEventsDescriptiondocument.createWebhook is triggered when a document is uploaded to users account in SignNowdocument.updateWebhook is triggered when a document is updated (fields added, text added, signature added, etc.)document.deleteWebhook is triggered when a document is deleted frominvite.createWebhook is triggered when an invitation to a SignNow document is created.invite.updateWebhook is triggered when an invite to Signnow document is updated. Ex. A signer has signed the document.createWebhookRes=signnow_python_sdk.Webhook.create(access_token,"document.create","YOUR URL");List Webhookslist_webhooks_res=signnow_python_sdk.Webhook.list_all(access_token);Delete Webhookdelete_webhook_res=signnow_python_sdk.Webhook.delete(AccessToken,"YOUR WEBHOOK ID");LinkCreate Linkcreate_link_res=signnow_python_sdk.Link.create(access_token,"YOUR DOCUMENT ID");LICENSEThis project is released under the Apache 2.0 [License](https://github.com/signnow/SNPythonSDK/blob/master/LICENSE.md).Additional Contact InformationSUPPORTTo contact SignNow support, please email [support@signnow.com](mailto:support@signnow.com).SALESFor pricing information please call (800) 831-2050 or email [sales@signnow.com](mailto:sales@signnow.com).