We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
Peter212
4 months agoExplorer | Level 3
[Dropbox Sign API] What is a best way to identify each document with their template after download
Hi,
I have integration with Dropbox Sign API (earlier HelloSign) that downloads documents after they were signed. I am downloading a zip file, and I would like to save them with different names ba...
Spencer H
Dropbox Staff
Hi there,
Thanks for reaching out! When downloading your files with the `zip` option, the files will be returned in the order that they were uploaded to the signature request.
The method you are using by looking at the order of templates in the `template_ids` array of the `signature_request_all_signed` event is a great way to track the order that your files will appear in the downloaded .zip file.
Additionally, using the metadata parameter when creating your signature request also gives you an option to include the names and order of the templates or files you are using in the request. The key-value data added with the metadata parameter will be included in all API responses and events involving the signature request. Here’s an example of how this would appear:
"metadata": {
"template_id_1": "First Template Name",
"template_id_2": "Second Template Name",
"template_id_3": "Third Template Name"
}
That way when you view the `signature_request_all_signed` event, you can also check the metadata array for the list of file names for easy reference when you go to update them after downloading the .zip file.
Please let us know if you have any additional questions or if you run into any issues with template and file order. Thanks!
Peter212
4 months agoExplorer | Level 3
Hi Spencer!
Thank you for your answer.
I am not sure if looking at the `template_ids` in the `signature_request_all_signed` is a good idea, because in my case the order of ids in it does not match the order in the template_ids passed when creating the `signature_request`:
Prefixes of ids in the array send to /send_with_template endpoint:
['26ed0', '72ff1', 'be531', '90480', 'd9ab6']
and the prefixes of ids received from `signature_request_all_signed` event payload
['90480', 'd9ab6', 'be531', '72ff1', '26ed0'].
I love your idea of using metadata for that. I was wondering if I could send an array with the correct order of ids in it, so I don't have to base it on the callback event template_ids array in the wrong order
- Spencer H4 months agoDropbox StaffHi there,Thanks for you reply! For the request with the mismatched order of documents, could you please open a ticket with our Sign API team and provide the following information so we can take a closer look at this case:
- The signature_request_id of the affected request
- A code snippet / screenshot of signature request payload used when sending the request
- A code snippet / screenshot of signature_request_all_signed event payload
With this information, we’ll be able to investigate further on our end to see why these are not matching.In regards to the metadata parameter, you can set an array of template_ids with the parameter that would look like this in your callback events:"metadata": { "template_order": [ "template_1", "template_2", "template_3" ] }
Please note, there are some limitations to keep in mind. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.I’ll keep an eye out for your ticket regarding the template_ids order mismatch!
About Dropbox Sign API
16 PostsLatest Activity: 2 months ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!