signing through api is not working
Thursday, May 25, 2017 at 06:23pmHi All,
Hope someone can shed some light on what i am doing wrong.
In salesforce apex code I am creating package
DateTime dT = System.now();
dT.addDays(7);
ESignLiveExamples.createPackageWithDocumentsExample(
'Demo12', true, 'Demo12 description', dT, 'Hello World, Demo12 is READY'
);
Works great no issue
Then I change the status to SENT
ESignLiveExamples.setStatusExample('{my package ID}', ESignLiveAPIObjects.PackageStatus.SENT);
no problem here too package move from DRAFT to INBOX
TIme to sign it
String outboundRequestBody = ESignLiveJSONHelper.prepareOutboundJSON('{"documents": [{"id": "contractId","name": "Demo12"}]}');
System.debug('=> outboundRequestBody:'+outboundRequestBody);
// Build Request
HttpRequest request = new HttpRequest();
request.setEndpoint('https://sandbox.esignlive.com/api/packages/{Package ID from the top}/documents/signed_documents');
request.setBody(outboundRequestBody);
request.setMethod('POST');
request.setHeader('Authorization', 'Basic ' + 'xxxxxxxxxxx');
request.setHeader('Content-type', 'application/json');
request.setHeader('Accept', 'application/json');
// Send Request
HttpResponse response = (new Http()).send(request);
I get response back 200 OK and when I look into esignlive INBOX document is still NOT SIGNED
Any help will be appreciated.
Thank you
-Ted
Reply to: signing through api is not working
Friday, May 26, 2017 at 04:42amReply to: signing through api is not working
Friday, May 26, 2017 at 07:33amReply to: signing through api is not working
Friday, May 26, 2017 at 07:38am