harishkonda | Posts: 26

Changing package status

0 votes
When I do PUT request to /api/packages/{package_id} with request payload as { "status": "DRAFT" } I get error response as { "code": 415, "entity": null, "message": "Unsupported Media Type", "messageKey": "http.status.415", "name": "Unsupported Media Type", "technical": "", "packageId": null } I have included Authorization and Accept headers in the request and above payload in Body. I am able to verify that package id is valid, and its current status is SENT. Verified by doing GET request via REST API. What are all the list of status for a package? SENT, DRAFT and?

Approved Answer
harishaidary | Posts: 1812

Reply to: Changing package status

0 votes
Okay. In any case, here's what your request should look like (see attachments).

Attachments
1-4.png43.56 KB
2-3.png31.52 KB
mwilliams | Posts: 957

Reply to: Changing package status

0 votes
To change to DRAFT, see this guide. To send the package again, you just need to call the eslClient.SendPackage(packageId) call. Hope this helps.

harishaidary | Posts: 1812

Reply to: Changing package status

0 votes
Hi there, What are your accept and content-type headers? Both should be "application/json" for this particular REST call. Also, the complete package statuses are: "DRAFT" "SENT" "COMPLETED" "ARCHIVED" "DECLINED" "OPTED_OUT" "EXPIRED"

harishkonda | Posts: 26

Reply to: Changing package status

0 votes
Haris, Both headers are -- application/json. Can you also confirm, the URI would be /api/packages/{package_id}?

harishaidary | Posts: 1812

Reply to: Changing package status

0 votes
Yes. Can your code so I can have a look at it? And a package id as well.

harishkonda | Posts: 26

Reply to: Changing package status

0 votes
I am testing this internal to my work place, not on eSign sandbox.

harishkonda | Posts: 26

Reply to: Changing package status

0 votes
I was sending the request payload in form-data, so it was changing content type header, but after looking at your screenshot, i changed it to raw, and it worked. Thanks a lot.

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