Title: | Connect to 'DocuSign' API |
---|---|
Description: | Connect to the 'DocuSign' Rest API <https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm>, which supports embedded signing, and sending of documents. |
Authors: | Carl Ganz [aut, cre], CannaData Solutions [cph] |
Maintainer: | Carl Ganz <[email protected]> |
License: | GPL-3 |
Version: | 0.0.3 |
Built: | 2024-11-01 02:53:03 UTC |
Source: | https://github.com/carlganz/docusignr |
Create XML authentication string
docu_auth(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"))
docu_auth(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"))
username |
docuSign username |
password |
docuSign password |
integrator_key |
docusign integratorKey |
Download Document from DocuSign
docu_download(file, username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, envelope_id)
docu_download(file, username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, envelope_id)
file |
a character string naming a file |
username |
docuSign username |
password |
docuSign password |
integrator_key |
docusign integratorKey |
base_url |
base_url |
envelope_id |
id of envelope |
## Not run: login <- docu_login(demo = TRUE) envelopes <- docu_list_envelopes(base_url = login$baseUrl[1], from_date = "2017/1/1") envelope_id <- envelopes[envelopes$status == "completed","envelopeId"][1] file <- tempfile() document <- docu_download(file, base_url = login[1, 3], envelope_id = envelope_id) ## End(Not run)
## Not run: login <- docu_login(demo = TRUE) envelopes <- docu_list_envelopes(base_url = login$baseUrl[1], from_date = "2017/1/1") envelope_id <- envelopes[envelopes$status == "completed","envelopeId"][1] file <- tempfile() document <- docu_download(file, base_url = login[1, 3], envelope_id = envelope_id) ## End(Not run)
Get URL for embedded docuSign
docu_embedded_sign(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, return_url, envelope_id, signer_name, signer_email, client_user_id, authentication_method = "None") docu_embedded_send(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, return_url, uri, signer_name, signer_email, client_user_id, authentication_method = "None")
docu_embedded_sign(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, return_url, envelope_id, signer_name, signer_email, client_user_id, authentication_method = "None") docu_embedded_send(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, return_url, uri, signer_name, signer_email, client_user_id, authentication_method = "None")
username |
docuSign username |
password |
docuSign password |
integrator_key |
docusign integratorKey |
base_url |
docuSign baseURL |
return_url |
URL to return to after signing |
envelope_id |
ID for envelope returned from |
signer_name |
Name of person signing document |
signer_email |
Email of person signing document |
client_user_id |
ID for signer |
authentication_method |
Method application uses to authenticate user. Defaults to "None". |
uri |
uri path |
## Not run: # assuming env variables are properly set up login <- docu_login() template <- docu_templates(base_url = login[1, "baseUrl"]) env <- docu_envelope(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), account_id = login[1, "accountId"], base_url = login[1, "baseUrl"], template_id = template$templateId, template_roles = list(name = "Name", email = "[email protected]", roleName = "Role", clientUserId = "1"), email_subject = "Subject", email_blurb = "Body" ) URL <- docu_embed( base_url = login[1, "baseUrl"], return_url = "www.google.com", signer_name = "Name", signer_email = "[email protected]", client_user_id = "1", envelope_id = env$envelopeId ) ## End(Not run)
## Not run: # assuming env variables are properly set up login <- docu_login() template <- docu_templates(base_url = login[1, "baseUrl"]) env <- docu_envelope(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), account_id = login[1, "accountId"], base_url = login[1, "baseUrl"], template_id = template$templateId, template_roles = list(name = "Name", email = "[email protected]", roleName = "Role", clientUserId = "1"), email_subject = "Subject", email_blurb = "Body" ) URL <- docu_embed( base_url = login[1, "baseUrl"], return_url = "www.google.com", signer_name = "Name", signer_email = "[email protected]", client_user_id = "1", envelope_id = env$envelopeId ) ## End(Not run)
Does envelope stuff
docu_envelope(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), account_id, status = "sent", base_url, template_id, template_roles, email_subject, email_blurb)
docu_envelope(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), account_id, status = "sent", base_url, template_id, template_roles, email_subject, email_blurb)
username |
docuSign username |
password |
docuSign password |
integrator_key |
docusign integratorKey |
account_id |
docuSign accountId |
status |
envelope status |
base_url |
docuSign baseURL |
template_id |
docuSign templateId |
template_roles |
list of parameters passed to template |
email_subject |
docuSign emailSubject |
email_blurb |
docuSign emailBlurb |
## Not run: # assuming env variables are properly set up login <- docu_login() template <- docu_templates(base_url = login[1, "baseUrl"]) (env <- docu_envelope(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), account_id = login[1, "accountId"], base_url = login[1, "baseUrl"], template_id = template$templateId, template_roles = list(name = "Name", email = "[email protected]", roleName = "Role", clientUserId = "1"), email_subject = "Subject", email_blurb = "Body" )) ## End(Not run)
## Not run: # assuming env variables are properly set up login <- docu_login() template <- docu_templates(base_url = login[1, "baseUrl"]) (env <- docu_envelope(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), account_id = login[1, "accountId"], base_url = login[1, "baseUrl"], template_id = template$templateId, template_roles = list(name = "Name", email = "[email protected]", roleName = "Role", clientUserId = "1"), email_subject = "Subject", email_blurb = "Body" )) ## End(Not run)
Check status of envelope
docu_envelope_status(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, envelope_id)
docu_envelope_status(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, envelope_id)
username |
docuSign username |
password |
docuSign password |
integrator_key |
docusign integratorKey |
base_url |
base_url |
envelope_id |
id of envelope |
## Not run: login <- docu_login(demo = TRUE) envelopes <- docu_list_envelopes(base_url = login$baseUrl[1], from_date = "2017/1/1") envelope_id <- envelopes[envelopes$status == "completed","envelopeId"][1] status <- docu_envelope_status(base_url = login[1, 3], envelope_id = envelope_id) ## End(Not run)
## Not run: login <- docu_login(demo = TRUE) envelopes <- docu_list_envelopes(base_url = login$baseUrl[1], from_date = "2017/1/1") envelope_id <- envelopes[envelopes$status == "completed","envelopeId"][1] status <- docu_envelope_status(base_url = login[1, 3], envelope_id = envelope_id) ## End(Not run)
Create header for authentication with docuSign
docu_header(auth)
docu_header(auth)
auth |
XML object with authentication info |
List envelopes since date
docu_list_envelopes(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, from_date)
docu_list_envelopes(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url, from_date)
username |
docuSign username |
password |
docuSign password |
integrator_key |
docusign integratorKey |
base_url |
base_url |
from_date |
character indicating begin date of search |
## Not run: login <- docu_login(demo = TRUE) envelopes <- docu_list_envelopes(base_url = login$baseUrl[1], from_date = "2017/1/1") ## End(Not run)
## Not run: login <- docu_login(demo = TRUE) envelopes <- docu_list_envelopes(base_url = login$baseUrl[1], from_date = "2017/1/1") ## End(Not run)
Login to DocuSign and get baseURL and accountId
docu_login(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), demo = FALSE)
docu_login(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), demo = FALSE)
username |
docuSign username |
password |
docuSign password |
integrator_key |
docusign integratorKey |
demo |
indicate whether to use DocuSign demo server |
## Not run: # assuming env variables are properly set up (login <- docu_login()) ## End(Not run)
## Not run: # assuming env variables are properly set up (login <- docu_login()) ## End(Not run)
See all templates associated with account
docu_templates(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url)
docu_templates(username = Sys.getenv("docuSign_username"), password = Sys.getenv("docuSign_password"), integrator_key = Sys.getenv("docuSign_integrator_key"), base_url)
username |
docuSign username |
password |
docuSign password |
integrator_key |
docusign integratorKey |
base_url |
docuSign baseURL |
## Not run: login <- docu_login() templates <- docu_templates(base_url = login[1, 3]) ## End(Not run)
## Not run: login <- docu_login() templates <- docu_templates(base_url = login[1, 3]) ## End(Not run)
Process results from POST or GET
parse_response(response)
parse_response(response)
response |
Result of POST or GET |