1

I am making a POST request to /v2/accounts/<account_id>/envelopes. Here is the error I am getting:

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

Normally this request contains some text tabs and checkbox tabs, none of these tabs refer to any page. We only specify name, tabLabel & value for text tabs and name, tabLabel & selected for checkboxes. But I get the same error even when I send no tab data.

Here is the request 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": [

            ]
        }
    }]
}

I have prettyprinted and redacted some fields but otherwise this is the exact same JSON we're sending.

Why are we getting an error about page number even though we're not specifying any pages, even when we're not specifying any tabs at all?

Arturs
  • 1,258
  • 5
  • 21
  • 28
muhuk
  • 15,777
  • 9
  • 59
  • 98

1 Answers1

0

In the DocuSign platform there are two ways of specifying tab locations, through absolute positioning using x and y coordinates or through what's known as Anchor Tagging, which places tabs based on document content. If you are making a POST request to the uri

/v2/accounts/<account_id>/envelopes

and you are setting the status to Sent instead of creating a draft by setting status to Created, then the that means you are sending a signature request and you need to have tab information filled out for all your tabs. That's why you get the error even when you are not setting any tabs in your request.

In terms of why you are getting the missing page number error, since you are using absolute positioning by setting the x and y coordinates you need to also specify on which page you are placing them. If you were using Anchor Tagging then you would not need to set the page numbers. So basically the ways you can set your tabs up are like this:

-- Absolute positioning --

"signHereTabs": [
    {
        "xPosition": "100",
        "yPosition": "100",
        "documentId": "1",
        "pageNumber": "1"
    }
]

-- Anchor Based Positioning --

"signHereTabs": [
    {
        "anchorString": "Please Sign Here:",
        "anchorXOffset": "1",
        "anchorYOffset": "0.5",
        "anchorIgnoreIfNotPresent": "false",
        "anchorUnits": "inches"
    }
]
Ergin
  • 9,254
  • 1
  • 19
  • 28
  • I am NOT using the absolute positioning. I DO NOT send xPosition or yPosition. I am also NOT using what you call anchor based positioning. I am simply following the example request here: http://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Send%20an%20Envelope%20from%20a%20Template.htm – muhuk Aug 29 '13 at 01:46
  • You say "you need to have tab information filled out for all your tabs", but if I don't combine these templates, if I use one template per envelope my request goes through with success. This is with or without tab information. It works just fine with a single template. So my experience says your statement I quoted above is wrong. – muhuk Aug 29 '13 at 01:49