DocuSign Rest API-使用多个CompositeTemplates之后下载完成的文档 [英] DocuSign Rest API - Downloading Completed Document after using multiple CompositeTemplates

查看:55
本文介绍了DocuSign Rest API-使用多个CompositeTemplates之后下载完成的文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用下面的代码从Docusign信封下载完整的文档:

I'm trying to download completed document(s) from a Docusign Envelope sing the below code:

byte [] fileData = walletsApi .getDocument(accountId,envelopeId,documentId);

但是,我认为问题出在我如何在CompositeTemplates中发送文档组成信封。我要为两个文档分配一个ID,该ID与我的应用程序中自定义POJO对象的ID相对应。直到我实现了CompositeTemplate设计描述此处

However, I think the problem lies with how I'm sending the documents in compositeTemplates that make up the envelope. I'm assigning both documents an ID that corresponds to a custom POJO object's ID in my application. The above envelopesApi.getDocument(accountId, envelopeId, documentId) code worked great until I implemented the compositeTemplate design describe here.

每个文档都需要使用不同的ID吗?

Do I need to use a different ID for each document?

我应该使用其他API调用吗?取回这些文件?将来可能会有两个以上的CompositeTemplates。因此,我需要一种方法来下载给定信封中的所有文档。

Should I be using a different API call to get back these documents? There will likely be more than two compositeTemplates in the future. So I'll need a way to download all documents in a given envelope.

感谢您的帮助。

推荐答案

可以使用 listEnvelopeDocuments api。

示例Json响应

{
  "envelopeId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "envelopeDocuments": [
    {
      "documentId": "1",
      "name": "document one",
      "type": "content",
    },
    {
      "documentId": "2",
      "name": "document two",
      "type": "content",
    },
    {
      "documentId": "certificate",
      "name": "Summary",
      "type": "summary",
    }
  ]
}

然后,您可以通过将正确的documentId传递给 getEnvelopeDocum ent api。

You can then download the documents by passing the correct documentId to the getEnvelopeDocument api.

documentId还具有两个特殊值

The documentId also takes two special values


  • 组合,检索包含所有文档和证书的组合内容的PDF。

  • combined Retrieve a PDF that contains the combined content of all documents and the certificate.

存档检索包含所有PDF文档,证书和用于语音身份验证的任何.WAV文件的ZIP存档。

archive Retrieve a ZIP archive that contains all of the PDF documents, the certificate, and any .WAV files used for voice authentication.

这篇关于DocuSign Rest API-使用多个CompositeTemplates之后下载完成的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆