r-mikolajuk | Posts: 26

Is it possible to change status from OPTED_OUT to DRAFT?

0 votes
I've tried to do a status change on OPTED_OUT package to DRAFT (edit data, then set it to SENT). Request
PUT /api/packages/PACKAGE_ID HTTP/1.1
Accept:  application/json,application/zip,application/pdf,text/html; esl-api-version=10.7
Accept-Encoding: gzip, deflate
Authorization: Basic XXX
Connection: keep-alive
Content-Length: 19
Content-Type: application/json
Host: sandbox.esignlive.com

{
    "status": "DRAFT"
}
Response:
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Content-Type: application/json
Date: Wed, 15 Feb 2017 10:35:54 GMT
Server: nginx
Transfer-Encoding: chunked
X-Powered-By: Undertow

{
    "code": 500, 
    "message": "Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.", 
    "messageKey": "error.internal.default", 
    "name": "Unhandled Server Error", 
    "technical": "[#a71ad7ab-ae52-4b4e-8402-afa0b845f56d]"
}
Although, I can edit the emailBody or set it to SENT. Which solves my issue (updating content, resending). But should it work that way? BTW. Is there any diagram showing which statuses can be set from which?

Approved Answer
harishaidary | Posts: 1812

Reply to: Is it possible to change status from OPTED_OUT to DRAFT?

0 votes
Hi there, When a signer opts-out, although the status of the transaction is OPTED_OUT, the transaction itself sits in your DRAFT folder. Hence, you can edit your transaction as soon as your signer opts out. Also, if you're on sandbox.esignlive.com, in your Accept header, the esl-api-version should be 11. In other words:
Accept:  application/json,application/zip,application/pdf,text/html; esl-api-version=11.0

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off