phplaraveldocusignapi

View attachments added through API docusign


I'm using the following endpoint to add an attachment to an envelope:

PUT /v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments

Apparently the request goes well because I get this return:

 "attachments" => array:2 [
    0 => array:4 [
      "attachmentId" => "656A658D-AD83-438C-B58D-86738486349C"
      "attachmentType" => "png"
      "name" => "asdas"
      "accessControl" => "SenderAndAllRecipients"
    ]
  ]

But nothing appears to the signers on the view. Where the signers can download or visualize the attachments that were added through the api?

UPDATE

The method to send the attachments:

 public function addAttachments($saleContract, $envelopeId)
    {
        $attachments = array();

        foreach ($saleContract->document as $document){
          array_push($attachments, [
              'accessControl' => 'senderAndAllRecipients',
              'attachmentId' => $document->id,
              'attachmentType' => \File::extension($document->storage_file_name),
              'data' => base64_encode(Storage::disk('sienge')->get($document->storage_file_name)),
              'name' => $document->file_name,
          ]);
        }

        Docusign::addEnvelopeAttachments($envelopeId, $attachments);
    }

Solution

  • These are Envelope API Attachments and can be access only via API. When you add these attachments via API, then you can access via API only and will not be available on the Signing screen.

    These are like metadata available in an envelope which should not be shown on the Signing screen, and can be accessed via API only. Dev Doc explains how to read these API attachments