Skip to main content
Question

listStatusChanges (PHP SDK) suddenly returning 404 response


Forum|alt.badge.img+1

Hello there,

In a production environment, we call the listStatusChange method with a list of envelope IDs retrieved from a database. This function is called in a cron job that runs every hour. It worked fine for two or three months until we suddenly got this exception:

Error while requesting server, received a non successful HTTP code [404] with response Body:   line 344                                    

At first, I thought it was a Docusign account change in production, but we only use one with several other applications.

Do you know what could cause this error?



 

4 replies

Forum|alt.badge.img+3
  • Docusign Employee
  • 20 replies
  • April 16, 2025

Hello,

My name is Sean, I am with the Developer Support team

That 404 error can be anything. Can you please create a case with support so we can review the issue 


Forum|alt.badge.img+1
  • Author
  • Newcomer
  • 2 replies
  • April 16, 2025

Hi Sean,

Thanks for your reply, I'll contact the support then. In the meantime, here's the piece of code throwing the exception, which is an APIException by the way:

$strUuids is a clean string of uuids separated by a comma.

$options = new ListStatusChangesOptions();
$options->setEnvelopeIds($strUuids);

try {

    $envelopeInformation = $envelopeApi->listStatusChanges(
                    $this->docusign->getAccountInfo('account_id'),
                    $options
                );
    $envelopes = $envelopeInformation->getEnvelopes();

            } catch (ApiException $e) {
                $io->error($this->setReportData('Unable to retrieve envelopes. Docusign API returned an error: ' . $e->getMessage() . ' line ' .$e->getLine()));

                return Command::FAILURE;
            }

Is it possible that the query parameters contain too many identifiers (UUIDs)? This is currently one of my leads.

 


Forum|alt.badge.img+3
  • Docusign Employee
  • 20 replies
  • April 16, 2025

Hi Vivian,

We would have to see what exactly comes back in the query

If you see in the following document for the listStatus endpoint there is no stated limit on the number of envelopeIDs that you can pass in the parameter query

https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/liststatus/ 


Forum|alt.badge.img+1
  • Author
  • Newcomer
  • 2 replies
  • April 22, 2025

Hi Sean,

Sorry for the late reply.

We managed to fix the error by limiting the number of envelopes passed in the listStatusChange function parameters (less than 50).

This thread can now be closed. Thank you.