Agreements¶
-
class
Agreement
(account, **kwargs)¶ Represents either a created agreement in Echosign, or one built in Python which can be sent through, and created in Echosign.
Parameters: account (EchosignAccount) – An instance of
EchosignAccount
. All Agreement actions will be conducted under this account.Keyword Arguments: - fully_retrieved (bool) – Whether or not the agreement has all information retrieved, or if only the basic information was pulled (such as when getting all agreements instead of requesting the specific agreement)
- echosign_id (str) – The ID assigned to the agreement by Echosign, used to identify the agreement via the API
- name (str) – The name of the document as specified by the sender
- status (Agreement.Status) – The current status of the document (OUT_FOR_SIGNATURE, SIGNED, APPROVED, etc)
- users (list[DisplayUser]) – The users associated with this agreement, represented by
EchosignAccount
- files (list) – A list of
TransientDocument
instances which will become the documents within the agreement. This information is not provided when retrieving agreements from Echosign.
-
account
¶ EchosignAccount – An instance of
EchosignAccount
. All Agreement actions will be conducted under this account.
-
fully_retrieved
¶ bool – Whether or not the agreement has all information retrieved, or if only the basic information was pulled (such as when getting all agreements instead of requesting the specific agreement)
-
echosign_id
¶ str – The ID assigned to the agreement by Echosign, used to identify the agreement via the API
-
name
¶ str – The name of the document as specified by the sender
-
status
¶ Agreement.Status – The current status of the document (OUT_FOR_SIGNATURE, SIGNED, APPROVED, etc)
-
users
¶ list[DisplayUser] – The users associated with this agreement, represented by
EchosignAccount
-
files
¶ list – A list of
TransientDocument
instances which will become the documents within the agreement. This information is not provided when retrieving agreements from Echosign.
-
class
SignatureFlow
¶ -
PARALLEL
= 'PARALLEL'¶
-
SENDER_SIGNS_ONLY
= 'SENDER_SIGNS_ONLY'¶
-
SEQUENTIAL
= 'SEQUENTIAL'¶
-
-
class
Status
¶ Possible status of agreements
Note
Echosign provides ‘WAITING_FOR_FAXIN’ in their API documentation, so pyEchosign has also included ‘WAITING_FOR_FAXING’ in case that’s just a typo in their documentation. Once it’s determined which is used, the other will be removed.
-
ACCEPTED
= 'ACCEPTED'¶
-
APPROVED
= 'APPROVED'¶
-
ARCHIVED
= 'ARCHIVED'¶
-
DELIVERED
= 'DELIVERED'¶
-
EXPIRED
= 'EXPIRED'¶
-
FORM
= 'FORM'¶
-
FORM_FILLED
= 'FORM_FILLED'¶
-
OTHER
= 'OTHER'¶
-
OUT_FOR_ACCEPTANCE
= 'OUT_FOR_ACCEPTANCE'¶
-
OUT_FOR_APPROVAL
= 'OUT_FOR_APPROVAL'¶
-
OUT_FOR_DELIVERY
= 'OUT_FOR_DELIVERY'¶
-
OUT_FOR_FORM_FILLING
= 'OUT_FOR_FORM_FILLING'¶
-
OUT_FOR_SIGNATURE
= 'OUT_FOR_SIGNATURE'¶
-
RECALLED
= 'RECALLED'¶
-
SIGNED
= 'SIGNED'¶
-
WAITING_FOR_AUTHORING
= 'WAITING_FOR_AUTHORING'¶
-
WAITING_FOR_FAXIN
= 'WAITING_FOR_FAXIN'¶
-
WAITING_FOR_FAXING
= 'WAITING_FOR_FAXING'¶
-
WAITING_FOR_MY_ACCEPTANCE
= 'WAITING_FOR_MY_ACCEPTANCE'¶
-
WAITING_FOR_MY_ACKNOWLEDGEMENT
= 'WAITING_FOR_MY_ACKNOWLEDGEMENT'¶
-
WAITING_FOR_MY_APPROVAL
= 'WAITING_FOR_MY_APPROVAL'¶
-
WAITING_FOR_MY_DELEGATION
= 'WAITING_FOR_MY_DELEGATION'¶
-
WAITING_FOR_MY_FORM_FILLING
= 'WAITING_FOR_MY_FORM_FILLING'¶
-
WAITING_FOR_MY_SIGNATURE
= 'WAITING_FOR_MY_SIGNATURE'¶
-
WIDGET
= 'WIDGET'¶
-
-
audit_trail_file
¶ The PDF file of the audit trail.
-
cancel
()¶ Cancels the agreement on Echosign. Agreement will still be visible in the Manage page.
-
combined_document
¶ The PDF file containing all documents within this agreement.
-
delete
()¶ Deletes the agreement on Echosign. Agreement will not be visible in the Manage page.
Note
This action requires the ‘agreement_retention’ scope, which doesn’t appear to be actually available via OAuth
-
documents
¶ Retrieve the
AgreementDocuments
associated with this agreement. If the files have not already been retrieved, this will result in an additional request to the API.Returns: A list of
AgreementDocument
-
get_form_data
()¶ Retrieves the form data for this agreement as CSV.
Returns: StringIO
-
get_signing_urls
()¶ Associate the signing URLs for this agreement with its
recipients
-
classmethod
json_to_agreement
(account, json_data)¶
-
classmethod
json_to_agreements
(account, json_data)¶
-
send
(recipients, agreement_name=None, ccs=None, days_until_signing_deadline=0, external_id='', signature_flow='SEQUENTIAL', message='', merge_fields=None)¶ Sends this agreement to Echosign for signature
Parameters: - agreement_name – A string for the document name which will appear in the Echosign Manage page, the email to recipients, etc. Defaults to the name for the Agreement.
- recipients – A list of
Users
. The order which they are provided in the list determines the order in which they sign. - ccs – (optional) A list of email addresses to be CC’d on the Echosign agreement emails (document sent, document fully signed, etc)
- days_until_signing_deadline – (optional) “The number of days that remain before the document expires. You cannot sign the document after it expires” Defaults to 0, for no expiration.
- external_id – (optional) “A unique identifier for your transaction... You can use the ExternalID to search for your transaction through [the] API”
- signature_flow – (optional) (SignatureFlow): The routing style of this agreement, defaults to Sequential.
- merge_fields – (optional) A list of dictionaries, with each one providing the ‘field_name’ and ‘default_value’ keys. The field name maps to the field on the document, and the default value is what will be placed inside.
- message – (optional) A message which will be displayed to recipients of the agreement
Returns: A namedtuple representing the information received back from the API. Contains the following attributes
- agreement_id
“The unique identifier that can be used to query status and download signed documents”
- embedded_code
“Javascript snippet suitable for an embedded page taking a user to a URL”
- expiration
“Expiration date for autologin. This is based on the user setting, API_AUTO_LOGIN_LIFETIME”
- url
“Standalone URL to direct end users to”
Raises: ApiError
– If the API returns an error, such as a 403. The exact response from the API is provided.
-
send_reminder
(comment='')¶ Send a reminder for an agreement to the participants.
Parameters: comment – An optional comment that will be sent with the reminder