envelopesApi.listStatus fails with 400
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.
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.
@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.
@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.
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 https://github.com/docusign/docusign-node-client/pull/231