Search code examples
docusignapi

DocuSign Envelopes: listStatus "UNSPECIFIED_ERROR"


I'm trying to make a API call to the eSignature REST API Envelopes: listStatus (as shown here)

However, I get ERROR 400 Bad Request and the following:

{
    "errorCode": "UNSPECIFIED_ERROR",
    "message": "Object reference not set to an instance of an object."
}

Even trying it in DocuSign's API explorer I get the same error. The error seems to be pointing to a issue with how the request body is formed. DocuSign suggests this,

{
  "envelopeIds": [
    "44c5ad6c-xxxx-xxxx-xxxx-ebda5e2dfe15",
    "8e26040d-xxxx-xxxx-xxxx-1e29b924d237",
    "c8b40a2d-xxxx-xxxx-xxxx-4fe56fe10f95"
  ]
}

however, if I use "envelopeIds" in the body instead I get:

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

replacing "envelopeIds" with "envelope_ids" I get:

Response:

{
    "errorCode": "UNSPECIFIED_ERROR",
    "message": "Object reference not set to an instance of an object."
}

and even using a comma separated list like, I get the same error:

Body:

{ "envelopeIds": "44c5ad6c-xxxx-xxxx-xxxx-ebda5e2dfe15,8e26040d-xxxx-xxxx-xxxx-1e29b924d237"}

Response:

{
    "errorCode": "UNSPECIFIED_ERROR",
    "message": "Object reference not set to an instance of an object."
}

Any help would be much appreciated. I have tried this using both postman and DocuSign's API explorer.


Solution

  • You need to include ?envelope_ids=request_body in the URL. Then it should work with the body:

    {
      "envelopeIds": [
        "44c5ad6c-xxxx-xxxx-xxxx-ebda5e2dfe15",
        "8e26040d-xxxx-xxxx-xxxx-1e29b924d237",
        "c8b40a2d-xxxx-xxxx-xxxx-4fe56fe10f95"
      ]
    }