INVALID_REQUEST_PARAMETER on listStatus

2019-08-27 03:29发布

I am trying to query Docusign to get a status of a set of envelopes but I am getting the INVALID_REQUEST_PARAMETER error.

Here is the curl request I am making

curl -X PUT \
  https://na2.docusign.net/restapi/v2/accounts/XXXXX/envelopes/status \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-DocuSign-Authentication: { ... }' \
  -d '{
    "envelopeIds": [
        "SOME ENVELOPE ID",
        "ANOTHER ENVELOPE ID"
    ]
  }'

Here is the full error I am getting

{
    "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."
}

According to the documentation if I include an array of envelopeIds this should work. It looks very similar to the example they have on that documentation page.

I know the error messages says to use envelope_ids so I tried that and got the same error.

What am I doing wrong here?

2条回答
Animai°情兽
2楼-- · 2019-08-27 04:06

If you want to pass envelopeIds in the requestBody then in the URL you need to set a query parameter as envelope_ids=request_body, so your complete URI will look like below:

PUT /restapi/v2/accounts/<accountId>/envelopes/status?envelope_ids=request_body

then you can pass requestBody as below:

{
    "envelopeIds": ["SOME ENVELOPE ID",
    "ANOTHER ENVELOPE ID"]
}
查看更多
手持菜刀,她持情操
3楼-- · 2019-08-27 04:07

Additionally you can also specify from_date as parameter as well

https://demo.docusign.net/restapi/v2/accounts/xxxxxx/envelopes/status?from_date=01/01/2019
查看更多
登录 后发表回答