Reputation: 831
i am trying to set a document status as "Declined" / "Completed" through API call however i a mgetting back an error mentioning only "sent" created or voided or the valid status
Can someone help me if i am making any error in the request
https://demo.docusign.net/restapi/v2/accounts//envelopes/
{"status":"completed"} OR {"status":"declined","voidedReason":"test"}
But getting the follwoing response back from DOCUSIGN { errorCode: "INVALID_REQUEST_PARAMETER" message: "The request contained at least one invalid parameter. Value for 'status' must be 'created', 'sent' or 'voided'." }
Upvotes: 0
Views: 738
Reputation: 13490
Only the recipient's action can trigger an Envelope status of "declined" or "completed". i.e., you can't decline an envelope via the API -- and you can't complete an envelope via the API -- the recipient's action of either declining or completing the Envelope is the only thing that will result in an Envelope with status of declined or completed.
As the error message indicates, the only Envelope statuses you can set via the API are 'created', 'sent', and 'void'. If you're simply trying to make it so that no further action can be conducted upon an in-progress envelope, then "void" is the status that you'd want to set via the API.
Upvotes: 3