Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnvelopesApi "liststatus" and "listStatusChanges" produce "400 BAD REQUEST" errors #156

Open
mkornblum opened this issue Aug 11, 2020 · 3 comments

Comments

@mkornblum
Copy link

Hello!

The following code always produces a 400 error:

EnvelopeIdsRequest request = new EnvelopeIdsRequest();
request.setEnvelopeIds(incompleteEnvelopeIds);

EnvelopesInformation envelopesInformation = envelopesApi
     .listStatus(accountId, request);
com.docusign.esign.client.ApiException: Error while requesting server, received a non successful HTTP code 400 with response Body: '{
  "errorCode": "INVALID_REQUEST_PARAMETER",
  "message": "The request contained at least one invalid parameter. Query parameter 'from_date' must be set to a valid DateTime, or 'envelope_ids' or 'transaction_ids' must be specified."
}'

From tracking this through the java client guts with the debugger, it looks to me like the EnvelopeIdsRequest is not getting properly serialized and not included with the request. It's there in the Docusign client code, but somewhere in Jersey it doesn't get written when the PUT is actually executed.

I wonder if this may be a similar underlying issue to #154? I also noticed a couple of comments from this past May on an old issue documenting the same problem: #76

I have tried this with both 2.15 and 3.6 of the Docusign client and had the same issue with both of them.

Thanks for any assistance!

Mark

@mkornblum
Copy link
Author

Also, if I do this:

EnvelopeIdsRequest request = new EnvelopeIdsRequest();
request.setEnvelopeIds(incompleteEnvelopeIds);

EnvelopesApi.ListStatusOptions listStatusOptions = envelopesApi.new ListStatusOptions();
listStatusOptions.setEnvelopeIds("request_body");
EnvelopesInformation envelopesInformation = envelopesApi.listStatus(accountId, request, listStatusOptions);

Then it works. However, the third param I believe is documented as being optional as things stand (at least in 2.15) and it feels kind of counter intuitive to be required to pass configuration in an optional third param in order to make the second param work.

(I pulled the code from looking at the unit tests associated with this ;) )

@LarryKlugerDS
Copy link
Contributor

Good job on solving the problem. The docs could certainly be clearer. I've filed DEVDOCS-3131 to improve them.
Thank you for raising this issue.

@fortuneFelix
Copy link

Wow! This is definitely an interesting one! I suggest to fix the API not the docs. This would have taken me days to work that out, I'm so glad I found this issue!
In the docs there should be a warning or some example showing that this is required!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants