Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
260 views
in Technique[技术] by (71.8m points)

docusignapi - Deliverymethod fax in docusign create and send API - demo environment

Hi Trying to use the DocuSign createsendEnvelope API for a recipient with delivery method FAX and fax number. However in the demo environment the API needs a recipients email and always send out the email. The document is not faxed to the number provided. Can any one confirm if the demo environment is disabled for faxing options?

Thanks in Advance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The release notes for the "Fax Out" feature in the DocuSign SOAP API describe how to send via fax with the SOAP API (http://www.docusign.com/sites/default/files/DocuSignReleaseNotes-Jun-1-2012-Final.pdf). I tried to apply the same rational to send an envelope via fax with the REST API -- here's my "Create Envelope" request:

POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes

{
  "emailSubject": "Please sign this",
  "emailBlurb": "Please sign...thanks!",
  "status": "sent",
  "enableWetSign": "true",
  "recipients": {
      "signers": [
        {
            "name": "John Doe",
            "email": "[email protected]",
            "faxNumber": "2069347947",
            "recipientId": "1",
            "routingOrder": "1",
            "deliveryMethod": "Fax",
        }]
   },
   "documents": [
        {
            "name": "TestFile.pdf",
            "documentId": "1",
            "fileExtension": "pdf",
            "documentBase64" : "DOCUMENT_BYTES"
        }
    ]
}

Unfortunately, I receive the following error in response to the request (even though the fax number I specified is a valid fax number):

{
    "errorCode": "INVALID_FAXNUMBER",
    "message": "Fax Number is invalid."
}

To troubleshoot further, I tried a little reverse-engineering in an attempt to determine what properties DocuSign expects you to set for a Fax recipient.

First, using the DocuSign web console, I created/sent a new Envelope with a single recipient where the delivery method = fax. Here's a screenshot of the Status pane from the DocuSign web console for this envlope (immediately after I sent it): status pane

Next, I used the REST API to execute a "Get Recipients" request (GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envId}}/recipients) -- with the goal of examining the recipient object in the response to determine which properties need to be set for a Fax recipient. Here's the response I received:

{
    "signers": [
        {
            "signInEachLocation": "false",
            "name": "John Doe",
            "email": "[email protected]",
            "recipientId": "1",
            "recipientIdGuid": "977e571d-6613-492c-8a75-9c207d46c03c",
            "requireIdLookup": "false",
            "userId": "03c8a856-c0ae-41bf-943d-ac6e92db66a8",
            "routingOrder": "1",
            "status": "sent"
        }
    ],
    "agents": [],
    "editors": [],
    "intermediaries": [],
    "carbonCopies": [],
    "certifiedDeliveries": [],
    "inPersonSigners": [],
    "recipientCount": "1",
    "currentRoutingOrder": "1"
}

Interestingly, the API response contains no mention of "deliveryMethod", and no mention of the fax number that was specified for the recipient. This would lead me to believe that perhaps the "fax" delivery method isn't fully supported via the REST API at this time. (If it is supported, then perhaps someone with DocuSign can chime in here and explain how to send via fax (with the API).)

In the meantime, if using the DocuSign SOAP API is an option for you, you might try that route, as it appears that the "Fax Out" feature was initially designed for and implemented in the SOAP API (so I'd expect it to work there, although I haven't personally tested it).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...