复合模板:无法预填充第一个选项卡

Composite Template: can't prefill first tabs

使用下面的代码,一切正常,除了我只能从我第二次附加的任何文档中填充选项卡。第一个选项卡甚至没有出现在 "Form Data" 列表中。我确定这是我忽略的小问题,但我看不出我所拥有的与我在该论坛其他地方看到的有什么区别,而且我找不到另一个 post 有这个问题。任何帮助将不胜感激。

{
"emailSubject": "DocuSign API - Composite Test",
"status": "sent",
"compositeTemplates": [
    {
        "serverTemplates": [
            {
                "sequence": "1",
                "templateId": "TEMPLATEID"
            }
        ],
        "inlineTemplates":[
            {
                "sequence":"1",
                "recipients": {
                    "inPersonSigner": [
                        {
                            "hostEmail": "HOTEMAIL",
                            "hostName": "HOSTNAME",
                            "inPersonSigningType": "inPersonSigner",
                            "recipientId": "1",
                            "roleName": "Primary",
                            "signerName": "John Doe",
                            "signerEmail": "Test@Test.com",
                            "clientUserId": "1001"
                        }
                    ]
                },
                "tabs": {
                    "textTabs": [
                        {
                            "tabLabel": "Address",
                            "value": "221 Cherry St"
                        }
                    ]
                }
            }
        ]
    },
{
        "serverTemplates":[
            {
                "sequence": "2",
                "templateId": "TEMPLATEID"
            }
        ],
         "inlineTemplates":[
            {
                "sequence":"2",
                "recipients": {
                    "inPersonSigners": [
                        {
                            "hostEmail": "HOSTEMAIL",
                            "hostName": "HOSTNAME",
                            "inPersonSigningType": "inPersonSigner",
                            "recipientId": "1",
                            "roleName": "Primary",
                            "signerName": "John Doe",
                            "signerEmail": "test@test.com",
                            "clientUserId": "1001"
                        }
                    ]
                },
                "tabs": {
                    "textTabs": [
                        {
                            "tabLabel": "ApplicantPhone",
                            "value": "123-456-7890"
                        }
                    ]
                }
            }
        ]
    }
]
}

关于您发布的 JSON 的一些评论:

  • inPersonSigners 的 属性 名称应该是复数(在您的 JSON 中,它在第一个复合模板对象中是单数 InPersonSigner
  • tabs 应该是每个 inPersonSigner 对象的 属性(在你的 JSON 中,它是 inlineTemplate 对象的 属性 )

考虑到这些反馈,您的 inPersonSigners 部分应该如何构建:

"inPersonSigners": [
    {
        "hostEmail": "HOSTEMAIL",
        "hostName": "HOSTNAME",
        "inPersonSigningType": "inPersonSigner",
        "recipientId": "1",
        "roleName": "Primary",
        "signerName": "John Doe",
        "signerEmail": "Test@Test.com",
        "clientUserId": "1001",
        "tabs": {
            "textTabs": [
                {
                    "tabLabel": "...",
                    "value": "..."
                }
            ]       
        }
    }
]

并且,这是您的整个 JSON 请求,已修改以反映我在上面描述的更改:

{
    "emailSubject": "DocuSign API - Composite Test",
    "status": "sent",
    "compositeTemplates": [
        {
            "serverTemplates": [
                {
                    "sequence": "1",
                    "templateId": "TEMPLATEID"
                }
            ],
            "inlineTemplates":[
                {
                    "sequence":"2",
                    "recipients": {
                        "inPersonSigners": [
                            {
                                "hostEmail": "HOSTMAIL",
                                "hostName": "HOSTNAME",
                                "inPersonSigningType": "inPersonSigner",
                                "recipientId": "1",
                                "roleName": "Primary",
                                "signerName": "John Doe",
                                "signerEmail": "Test@Test.com",
                                "clientUserId": "1001",
                                "tabs": {
                                    "textTabs": [
                                        {
                                            "tabLabel": "Address",
                                            "value": "221 Cherry St"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        },
        {
            "serverTemplates":[
                {
                    "sequence": "1",
                    "templateId": "TEMPLATEID"
                }
            ],
             "inlineTemplates":[
                {
                    "sequence":"2",
                    "recipients": {
                        "inPersonSigners": [
                            {
                                "hostEmail": "HOSTEMAIL",
                                "hostName": "HOSTNAME",
                                "inPersonSigningType": "inPersonSigner",
                                "recipientId": "1",
                                "roleName": "Primary",
                                "signerName": "John Doe",
                                "signerEmail": "test@test.com",
                                "clientUserId": "1001",
                                "tabs": {
                                    "textTabs": [
                                        {
                                            "tabLabel": "ApplicantPhone",
                                            "value": "123-456-7890"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ]
}