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 fails with 400 #177

Open
IAmVisco opened this issue May 26, 2020 · 4 comments
Open

envelopesApi.listStatus fails with 400 #177

IAmVisco opened this issue May 26, 2020 · 4 comments

Comments

@IAmVisco
Copy link

IAmVisco commented May 26, 2020

Calling listStatus() method with only fromDate option which is valid according to the docs always fails with HTTP 400.

const result = await envelopesApi.listStatus(this.accountId, {
  fromDate,
})

Further investigation showed that request sent is failing with "INVALID_REQUEST_BODY", "The request body is missing or improperly formatted." error which originates from sending an empty request body. Sending {} as the request body contents with Postman resolves the issue but there is no way to send empty body using library.

Fun fact: setting envelopeIdsRequest to {} causes API to throw NullReferenceException.

@acooper4960
Copy link
Contributor

acooper4960 commented May 27, 2020

Hi @IAmVisco Could you please verify your SDK version? Also could you verify the parameters passed to this call, ensuring that fromDate is a correct Date. Simply stating

envelopesApi.listStatusChanges(accountId, {
  fromDate: new Date("10-10-2019"),
})

Successfully retrieves a list of status changes in the latest version on master

As for "envelopeIdsRequest" it is not listed as a parameter for this SDK. I would need to see an example of this code.

@IAmVisco
Copy link
Author

IAmVisco commented May 27, 2020

@acooper4960 not listStatusChanges but listStatus. My code sample left from testing, updated it, listStatusChanges works for me as well. I pass moment().toISOString() and the version has to be latest from master as well.

@acooper4960
Copy link
Contributor

acooper4960 commented May 27, 2020

@IAmVisco it does appear that this endpoint does not behave as mentioned in the documentation. I have created an internal ticket to address this.

It appears envelopeIdsRequest and furthermore envelopeIds are not optional even though they are explicitly stated as such in the docs.

@johnharnett
Copy link

johnharnett commented Nov 2, 2020

the documentation for listStatus shows a PUT request. I changed my local package code to a GET request and it worked.

I put in a pull request #231

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