Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
2 replies
Subscribers
6 subscribers
Views
2378 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
Integration with external API
ankitab918
over 6 years ago
Hi I have a requirement to integrate with docusign for digital signing of legal documents. I am getting the 400 error while doing so. Can you please point out if I am missing here something. Please find my code below:
Please note, the first call i.e, local!login is successful
load(
local!authHeader:"X-DocuSign-Authentication",
local!credentials:{"Username":"<useremail>","Password":"<userPassword>","IntegratorKey":"<IntegratorKeyGenerated>"},
local!signers:{"email":"recepientMail","name":"<recepientName>","recipientId":1,"routingOrder":1},
local!documents:{"documentId":419616 ,"name":"Affinity Physician Statement Form","documentBase64":convertdocumenttobase64(419616)},
local!emailDetails:{"emailSubject":"TestEmail","emailBlurb":"ShowsHowTocreateEnvlope","recipients":{"signers":local!signers},"documents":local!documents,"status":"sent"},
local!login:a!httpQuery(
url:"
https://demo.do...
OriginalPostID-255140
Discussion posts and replies are publicly visible
0
ankitab918
over 6 years ago
...cusign.net/restapi/v2/login_information",
headers:{
a!httpHeader(local!authHeader, a!toJson(local!credentials))
}
).result.body,
local!baseUrl:a!fromJson(local!login).loginAccounts.baseUrl,
local!envelopeRequest:bind(
get:
a!httpQuery(
url:local!baseUrl&"/envelopes",
headers:{
a!httpHeader("Accept","application/json"),
a!httpHeader("Content-Type","application/json"),
a!httpHeader(local!authHeader, a!toJson(local!credentials))
/*a!httpHeader(local!authHeader,a!toJson(local!emailDetails))*/
}
),
set:
a!httpWrite(
url:_,
method:"POST",
headers:{
a!httpHeader("Accept","application/json"),
a!httpHeader("Content-Type","application/json"),
a!httpHeader(local!authHeader, a!toJson(local!credentials))
/*a!httpHeader(local!authHeader,a!toJson(local!emailDetails))*/
},
body:{a!toJson(lo...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ankitab918
over 6 years ago
...cal!emailDetails)}
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel