基本上我開發了一個在沙盒中工作但不在生產中的解決方案。Docusign API信封創建未指定錯誤
{
"documents":[
{
"documentId":"73110157",
"fileExtension":"pdf",
"name":"Standard Swell HIC-clean.pdf",
"documentBase64":"omitted_the_base64_string"
}
],
"emailSubject":"Standard Swell Home Improvement Contract",
"recipients":{
"carbonCopies":[
{
"email":"[email protected]",
"name":"Name",
"recipientId":"2",
"routingOrder":"2"
},
{
"email":"[email protected]",
"name":"Name",
"recipientId":"3",
"routingOrder":"3"
},
{
"email":"[email protected]",
"name":"Name",
"recipientId":"4",
"routingOrder":"4"
}
],
"signers":[
{
"email":"[email protected]",
"name":"Mic Nuss",
"recipientId":"1",
"routingOrder":"1",
"clientUserId":"an-alpha-numeric-ID",
"roleName":"Customer",
"tabs":{
"dateSignedTabs":[
{
"anchorString":"signer1date",
"anchorYOffset":"-2",
"anchorXOffset":"0",
"fontSize":"Size10",
"name":"Date Signed",
"recipientId":"1",
"tabLabel":"date_signed",
"anchorIgnoreIfNotPresent":"true",
"documentId":"73110157"
}
],
"fullNameTabs":[
{
"anchorString":"signer1name",
"anchorYOffset":"0",
"anchorXOffset":"-10",
"fontSize":"Size10",
"name":"Full Name",
"recipientId":"1",
"tabLabel":"Full Name",
"anchorIgnoreIfNotPresent":"true",
"documentId":"73110157"
}
],
"signHereTabs":[
{
"anchorString":"signer1sig",
"anchorUnits":"mms",
"anchorXOffset":"-10",
"anchorYOffset":"3",
"name":"Please sign here",
"optional":"false",
"recipientId":"1",
"scaleValue":1,
"tabLabel":"signer1sig",
"anchorIgnoreIfNotPresent":"true",
"documentId":"73110157"
}
],
"initialHereTabs":[
{
"anchorString":"signer1initials",
"anchorUnits":"mms",
"anchorXOffset":"13",
"anchorYOffset":"10",
"name":"Your Initials here",
"optional":"false",
"recipientId":"1",
"scaleValue":1,
"tabLabel":"signer1initials",
"anchorIgnoreIfNotPresent":"true",
"documentId":"73110157"
}
],
"textTabs":[
{
"anchorString":"signer1c_info",
"anchorUnits":"mms",
"anchorXOffset":"-4",
"anchorYOffset":"-2",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Client Info",
"shared":"true",
"tabLabel":"signer1c_info",
"value":"Mic Nuss\n2223834843\[email protected]",
"width":"167",
"height":"58",
"documentId":"73110157"
},
{
"anchorString":"signer1c_address",
"anchorUnits":"mms",
"anchorXOffset":"-4",
"anchorYOffset":"-2",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Client Address",
"shared":"true",
"tabLabel":"signer1c_address",
"value":"Rua Frederico Perry Vidal, Lisbon, 7900, Lisbon",
"width":"167",
"height":"58",
"documentId":"73110157"
},
{
"anchorString":"signer1c_contractor",
"anchorUnits":"mms",
"anchorXOffset":"-4",
"anchorYOffset":"-2",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Contractor Info",
"shared":"true",
"tabLabel":"signer1c_contractor",
"value":"Solarcity\nfalse",
"width":"167",
"height":"58",
"documentId":"73110157"
},
{
"anchorString":"signer1c_epc_license",
"anchorUnits":"mms",
"anchorXOffset":"-3",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Contractor License",
"shared":"true",
"tabLabel":"signer1c_epc_license",
"value":"888104",
"width":"130",
"height":"10",
"documentId":"73110157"
},
{
"anchorString":"signer1c_product",
"anchorUnits":"mms",
"anchorXOffset":"-2",
"anchorYOffset":"0",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Product Name",
"shared":"true",
"tabLabel":"signer1c_product",
"value":"Sonnen Eco 10",
"width":"450",
"height":"70",
"documentId":"73110157"
},
{
"anchorString":"signer1c_scope",
"anchorUnits":"mms",
"anchorXOffset":"-4",
"anchorYOffset":"-2",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Scope of Work",
"shared":"true",
"tabLabel":"signer1c_scope",
"value":"",
"width":"450",
"height":"90",
"documentId":"73110157"
},
{
"anchorString":"signer1c_total_contract",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Base Price",
"shared":"true",
"tabLabel":"signer1c_total_contract",
"value":"19557.5",
"width":"200",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_credits",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Credits",
"shared":"true",
"tabLabel":"signer1c_credits",
"value":"250.0",
"width":"200",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_amount_due",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Net Price",
"shared":"true",
"tabLabel":"signer1c_amount_due",
"value":"19307.5",
"width":"200",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_amount_owner",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Amount Due from Owner",
"shared":"true",
"tabLabel":"signer1c_amount_owner",
"value":"19307.5",
"width":"200",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_amount_financier",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Amount Due from Financier",
"shared":"true",
"tabLabel":"signer1c_amount_financier",
"value":"0",
"width":"200",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_financier",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Financier",
"shared":"true",
"tabLabel":"signer1c_financier",
"value":"",
"width":"200",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_signing_value",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Down Payment",
"shared":"true",
"tabLabel":"signer1c_signing_value",
"value":"1000.0",
"width":"130",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_delivery_value",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Delivery Payment",
"shared":"true",
"tabLabel":"signer1c_delivery_value",
"value":"11584.5",
"width":"130",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_install_value",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Installation Payment",
"shared":"true",
"tabLabel":"signer1c_install_value",
"value":"5792.25",
"width":"130",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_final_value",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Final Payment",
"shared":"true",
"tabLabel":"signer1c_final_value",
"value":"930.75",
"width":"130",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_installation_partner",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Installation Partner Name",
"shared":"true",
"tabLabel":"signer1c_installation_partner",
"value":"Solarcity",
"width":"200",
"height":"10",
"documentId":"73110157"
},
{
"anchorString":"signer1c_epc_address",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Installation Partner Address",
"shared":"true",
"tabLabel":"signer1c_epc_address",
"value":"false",
"width":"520",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_email_epc",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Installation Partner Email",
"shared":"true",
"tabLabel":"signer1c_email_epc",
"value":"",
"width":"200",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_date_in_3",
"anchorUnits":"mms",
"anchorXOffset":"0",
"anchorYOffset":"-2",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Date in 3",
"shared":"true",
"tabLabel":"signer1c_date_in_3",
"value":"2016-07-22",
"width":"130",
"height":"15",
"documentId":"73110157"
},
{
"anchorString":"signer1c_kitchen",
"anchorUnits":"mms",
"anchorXOffset":"-4",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Requested Circuits Kitchen",
"shared":"true",
"tabLabel":"signer1c_kitchen",
"value":"Refrigerator/Freezer;Coffee Machine or Tea Kettle;Microwave",
"width":"450",
"height":"30",
"documentId":"73110157"
},
{
"anchorString":"signer1c_utilities",
"anchorUnits":"mms",
"anchorXOffset":"-4",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Requested Circuits Utilities",
"shared":"true",
"tabLabel":"signer1c_utilities",
"value":"Security System",
"width":"450",
"height":"30",
"documentId":"73110157"
},
{
"anchorString":"signer1c_media",
"anchorUnits":"mms",
"anchorXOffset":"-4",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Requested Circuits Media",
"shared":"true",
"tabLabel":"signer1c_media",
"value":"Television \u0026 Cable/Satellite Box;Internet Router \u0026 WiFi",
"width":"370",
"height":"30",
"documentId":"73110157"
},
{
"anchorString":"signer1c_outlets",
"anchorUnits":"mms",
"anchorXOffset":"-4",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Requested Circuits Outlets",
"shared":"true",
"tabLabel":"signer1c_outlets",
"value":"Kitchen;",
"width":"450",
"height":"30",
"documentId":"73110157"
},
{
"anchorString":"signer1c_lighting",
"anchorUnits":"mms",
"anchorXOffset":"-4",
"anchorYOffset":"-1",
"anchorIgnoreIfNotPresent":"true",
"locked":"true",
"name":"Requested Circuits Lighting",
"shared":"true",
"tabLabel":"signer1c_lighting",
"value":"Kitchen;",
"width":"450",
"height":"30",
"documentId":"73110157"
}
]
}
}
]
},
"status":"sent"
}
這是正在發送的有效載荷。 我嘗試過一個更苗條的文檔,只有一個簽名TAB,和一個簽名者,沒有BCC的。
我試過了我編碼的base64文檔(從docusign模板下載它之後),我試過讓Docusign base64文檔通過Docusign自己編碼,我下載了模板並複製了base64內容該文件,都無濟於事。
我試圖創建簡單地從現有模板信封,沒有「文件」鍵。我試着擦除不同的可選字段,但唯一一次響應改變的是當我刪除某些確定需要的字段時,然後我將其作爲響應。
的這一切都準確無誤地運行在沙盒。這些文檔首先是在Production中從頭開始創建的,但後來我認爲這可能是由於這個原因造成的,並且在API轉換註釋中提到並從Sandbox下載了JSON模板並直接將其上傳到生產環境中。
信封被動態創建,我們基本上登錄到一個帳戶,並獲得該帳戶的模板,並繼續得到我們需要的模板文件的base64文件。登錄和那部分工作,我們進入帳戶,我們能夠檢索它們,所以標題和憑證傳遞和登錄是好的。
有效載荷也被正確地發送,我張貼在這裏的人是我記錄的實際調用。
,因爲它在到達該點之前中斷它不涉及到內嵌視圖。
我得到的迴應是:
{
"errorCode": "UNSPECIFIED_ERROR",
"message": "Input string was not in a correct format."
}
我也試了3分不同的lib的,淨HTTP,路邊(紅寶石捲曲套)和REST的客戶端。
我嘗試沒有設置標籤中的文檔ID以及其他鍵。
我張貼到BASE_URL/V2 /帳號/ {}帳戶ID /信封
任何幫助將不勝感激,謝謝
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::EDIT::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
以更簡單的請求試過,只是爲了創造一個信封,它仍然不起作用。同樣的錯誤。
這是來自Docusign服務器的日誌: (登錄和訪問正常,檢索帳戶,該帳戶的模板,文檔和下載文檔的作品,只是該帖子根本無法工作 - 雖然它在沙盒中)
POST https://na2.docusign.net:8821/restapi/v2/accounts/15308603/envelopes
Content-Length: 973
Content-Type: application/json
Accept: application/json
Host: na2.docusign.net
User-Agent: Ruby
X-Docusign-Authentication: {"Username":"[email protected]","Password":"[omitted]","IntegratorKey":"[omitted]"}
X-Forwarded-For: 83.132.223.215
X-SecurityProtocol-Version: TLSv1.2
X-SecurityProtocol-CipherSuite: ECDHE-RSA-AES256-GCM-SHA384
{"emailSubject":"DocuSign REST API Quickstart Sample","emailBlurb":"Shows how to create and send an envelope from a document.","recipients":{"signers":[{"email":"[email protected]","name":"My Name","recipientId":"1","routingOrder":"1"}]},"documents":[{"documentId":"44202387","fileExtension":"pdf","name":"test.pdf","documentBase64":"ew0KICAidGVtcGxhdGVJZCI6ICIxYjZjY2FkMS01ZDFmLTQwM2EtYjRhMC0zZTVkZjU1OThhZTUiLA0KICAidGVtcGxhdGVEb2N1bWVudHMiOiBbDQogICAgew0KICAgICAgImRvY3VtZW50SWQiOiAiNDQyMDIzODciLA0KICAgICAgIm5hbWUiOiAidGVzdC5wZGYiLA0KICAgICAgInR5cGUiOiAiY29udGVudCIsDQogICAgICAidXJpIjogIi90ZW1wbGF0ZXMvMWI2Y2NhZDEtNWQxZi00MDNhLWI0YTAtM2U1ZGY1NTk4YWU1L2RvY3VtZW50cy80NDIwMjM4NyIsDQogICAgICAib3JkZXIiOiAiMSIsDQogICAgICAicGFnZXMiOiAiMSIsDQogICAgICAiYXZhaWxhYmxlRG9jdW1lbnRUeXBlcyI6IFsNCiAgICAgICAgew0KICAgICAgICAgICJ0eXBlIjogImVsZWN0cm9uaWMiLA0KICAgICAgICAgICJpc0RlZmF1bHQiOiAidHJ1ZSINCiAgICAgICAgfQ0KICAgICAgXQ0KICAgIH0NCiAgXQ0KfQ=="}],"status":"sent"}
400 BadRequest
Content-Type: application/json; charset=utf-8
{
"errorCode": "UNSPECIFIED_ERROR",
"message": "Input string was not in a correct format."
}
是的,它是被證明的,它是所謂的工作。我正在使用傳統標頭身份驗證。我可以登錄,並獲取帳戶,然後獲取帳戶的所有模板,這意味着身份驗證正常,並且API正在工作。該請求是作爲https創建信封(以及其他所有內容)的,但是由於該錯誤而失敗。該過程與在沙箱中開發的過程完全相同。 API日誌並沒有多大意義,如果您認爲這會有所幫助,我可以向您展示錯誤。謝謝 –