我正在向/v2/accounts/<account_id>/envelopes
发出POST请求。这是我得到的错误:
{
"errorCode": "TAB_PAGENUMBER_IS_NOT_IN_DOCUMENT",
"message": "The pagenumber specified in the tab element is not in the document that the tab refers to. Tab on Page 2 of Document 3 for Recipient 1"
}
通常此请求包含一些文本选项卡和复选框选项卡,这些选项卡都不会引用任何页面。我们只指定name
,tabLabel
&amp; value
用于文字标签和name
,tabLabel
&amp; selected
表示复选框。但即使我没有发送标签数据,我也会得到同样的错误。
这是请求JSON:
{
"allowMarkup": false,
"allowReassign": false,
"allowRecipientRecursion": false,
"asynchronous": false,
"authoritativeCopy": false,
"autoNavigation": false,
"brandId": "",
"compositeTemplates": [{
"inlineTemplates": [{
"sequence": "2",
"recipients": {
"signers": [{
"accessCode": null,
"clientUserId": "123456",
"email": "EMAIL_1",
"emailNotification": null,
"name": "Atamert Olcgen",
"recipientId": "1",
"roleName": "Signer",
"tabs": {
"checkboxTabs": [
],
"radioGroupTabs": [
],
"textTabs": [
]
}
}]
}
}, {
"sequence": "3",
"recipients": {
"signers": [{
"accessCode": null,
"clientUserId": "123456",
"email": "EMAIL_1",
"emailNotification": null,
"name": "Atamert Olcgen",
"recipientId": "1",
"roleName": "Signer",
"tabs": {
"checkboxTabs": [
],
"radioGroupTabs": [
],
"textTabs": [
]
}
}]
}
}],
"serverTemplates": [{
"sequence": "2",
"templateId": "SECOND_TEMPLATE_ID"
}, {
"sequence": "3",
"templateId": "THIRD_TEMPLATE_ID"
}]
}],
"customFields": null,
"emailBlurb": "",
"emailSubject": "Email Subject",
"enableWetSign": false,
"enforceSignerVisibility": false,
"envelopeIdStamping": false,
"eventNotification": null,
"signingLocation": "Online",
"status": "sent",
"templateId": "FIRST_TEMPLATE_ID",
"templateRoles": [{
"accessCode": null,
"clientUserId": "123456",
"email": "EMAIL_1",
"emailNotification": null,
"name": "Atamert Olcgen",
"recipientId": "1",
"roleName": "Signer",
"tabs": {
"checkboxTabs": [
],
"radioGroupTabs": [
],
"textTabs": [
]
}
}, {
"accessCode": null,
"clientUserId": null,
"email": "EMAIL_2",
"emailNotification": null,
"name": "COMPANY_NAME",
"recipientId": "2",
"roleName": "COMPANY_NAME",
"tabs": {
"checkboxTabs": [
],
"radioGroupTabs": [
],
"textTabs": [
]
}
}]
}
我已经精心打印并编辑了一些字段,但除此之外,这与我们发送的JSON完全相同。
为什么即使我们没有指定任何页面,我们也会收到有关页码的错误,即使我们根本没有指定任何标签页?
答案 0 :(得分:0)
在DocuSign平台中,有两种方法可以指定标签位置,通过使用x和y坐标的绝对定位,或通过所谓的Anchor Tagging,它根据文档内容放置标签。如果您正在向uri发送POST请求
/v2/accounts/<account_id>/envelopes
并且您将状态设置为已发送,而不是通过将状态设置为已创建来创建草稿,那么这意味着您要发送签名请求,而您需要为所有标签填写标签信息。即使您没有在请求中设置任何标签,也会出现错误。
就您获取遗失页码错误的原因而言,由于您通过设置x和y坐标使用绝对定位,因此您还需要指定放置它们的页面。如果您使用的是Anchor Tagging,则无需设置页码。所以基本上你可以设置标签的方式如下:
- 绝对定位 -
"signHereTabs": [
{
"xPosition": "100",
"yPosition": "100",
"documentId": "1",
"pageNumber": "1"
}
]
- 基于锚点的定位 -
"signHereTabs": [
{
"anchorString": "Please Sign Here:",
"anchorXOffset": "1",
"anchorYOffset": "0.5",
"anchorIgnoreIfNotPresent": "false",
"anchorUnits": "inches"
}
]