Sign Requests are used to request e-signatures on documents from signers.
A Sign Request can refer to one or more Box Files and can be sent to one or more Box Sign Request Signers.
- Create Sign Request
- Get all Sign Requests
- Get Sign Request by ID
- Cancel Sign Request
- Resend Sign Request
The client.create_sign_request_v2(signers, files=None, parent_folder_id=None, prefill_tags=None, are_reminders_enabled=None, are_text_signatures_enabled=None, days_valid=None, email_message=None, email_subject=None, external_id=None, is_document_preparation_needed=None, redirect_url=None, declined_redirect_url=None, template_id=None)
method will create a Sign Request. You need to provide at least one file and up to 10 files (from which the signing document will be created) or template_id of the sign request template. You need to include at least one signer that will receive the Sign Request.
Example with files:
source_file = {
'id': '12345',
'type': 'file'
}
files = [source_file]
signer = {
'name': 'John Doe',
'email': '[email protected]'
}
signers = [signer]
parent_folder_id = '123456789'
new_sign_request = client.create_sign_request_v2(signers, files=files, parent_folder_id=parent_folder_id)
print(f'(Sign Request ID: {new_sign_request.id})')
Example with sign template
signer = {
'name': 'John Doe',
'email': '[email protected]'
}
new_sign_request = client.create_sign_request_v2(signers, template_id='12345')
print(f'(Sign Request ID: {new_sign_request.id})')
If you set isDocumentPreparationNeeded
flag to true, you need to visit prepareUrl
before the Sign Request will be sent.
For more information on isDocumentPreparationNeeded
and the other parameters available, please refer to the developer documentation.
Calling the client.get_sign_requests()
will return an iterable that will page through all the Sign Requests. This method offers limit
and fields
parameters. The limit
parameter specifies the maximum number of items to be returned in a single response. The fields
parameter is used to specify what additional properties should be returned on the return object. For more information on what fields
are available, please refer to the developer documentation.
sign_requests = client.get_sign_requests()
for sign_request in sign_requests:
print(f'(Sign Request ID: {sign_request.id})')
Calling client.sign_request(sign_request_id)
will return an object
containing information about the Sign Request.
The fields
parameter is used to specify what additional properties should be returned in the return object.
sign_request = client.sign_request(sign_request_id='12345').get()
print(f'Sign Request ID is {sign_request.id}')
Calling sign_requests.cancel()
will cancel a created Sign Request.
sign_request = client.sign_request(sign_request_id='12345')
cancelled_sign_request = sign_request.cancel()
print(f'Cancelled Sign Request status is {cancelled_sign_request.status}')
Calling sign_requests.resend()
will resend a Sign Request to all signers that have not signed it yet.
There is an 10-minute cooling-off period between re-sending reminder emails.
sign_request = client.sign_request(sign_request_id='12345')
sign_request.resend()