0

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

{
"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"
                        }
                    ]
                }
            }
        ]
    }
]
}
4

1 回答 1

0

关于您发布的 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"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ]
}
于 2017-11-17T15:19:05.260 回答