Skip to main content
Inspiring
July 8, 2015
Answered

What is the proper structure for sendDocument API call with multiple files?

  • July 8, 2015
  • 1 reply
  • 442 views

Hello - from the SOAP API documentation, you can send multiple template filenames to be merged into a single pdf to be sent out for signing:

fileInfos

- FileInfo[]

-A list of one or more files (or references to files) that will be sent out for signature. If more than one file is provided, they will be combined into one PDF before being sent out.

What is the proper structure to send merged files? I can't tell if the fileInfos is a node with mulitiple FileInfo children, or if a single FileInfo child should contain an array of libraryDocumentName strings.

thx

This topic has been closed for replies.
Correct answer nbennett25

Figured it out! fileInfos should have multiple FileInfo children, each with their own libraryDocumentName strings:

fileInfos

- FileInfo

      - libraryDocumentName

- FileInfo

     - libraryDocumentName

etc.

for anyone building this in PHP as an associative array before sending it to the SOAP client, it looks like this:

...
'fileInfos' => array(
  'FileInfo' => array(
       array(
          'libraryDocumentName' => 'Template 1'
       ),
       array(
         'libraryDocumentName' => 'Template 2'
       )
    )
)
...

1 reply

nbennett25AuthorCorrect answer
Inspiring
July 8, 2015

Figured it out! fileInfos should have multiple FileInfo children, each with their own libraryDocumentName strings:

fileInfos

- FileInfo

      - libraryDocumentName

- FileInfo

     - libraryDocumentName

etc.

for anyone building this in PHP as an associative array before sending it to the SOAP client, it looks like this:

...
'fileInfos' => array(
  'FileInfo' => array(
       array(
          'libraryDocumentName' => 'Template 1'
       ),
       array(
         'libraryDocumentName' => 'Template 2'
       )
    )
)
...