无法添加TextTab

时间:2017-07-14 13:12:35

标签: docusignapi

您好我可以通过添加signhere标签发送信封,但是当我尝试添加TextTabs时,它会给出以下错误(我正在使用其他API' s)

  

INVALID_REQUEST_BODY 请求正文丢失或格式不正确。无效对象无法转换为值类型。

以下是我的信封定义JSON请求

DataGridView.Rows.Add(whatever)

1 个答案:

答案 0 :(得分:1)

错误消息显示全部

  

无法将空对象转换为值类型。

删除分配了空值的属性。以下JSON应该可以工作。

{
  "documents": [
      {
          "documentId": "1136641236",
          "name": "ABC Merchant Agreement",
          "documentBase64": "documentBase64"
      }
  ],
  "recipients": {
      "signers": [
          {
              "tabs": {
                  "signHereTabs": [
                      {
                          "documentId": "1136641236",
                          "pageNumber": "1",
                          "anchorString": "SIGNATUREOWNER1",
                          "anchorCaseSensitive": "True",
                          "anchorMatchWholeWord": "True"
                      }
                  ],
                  "textTabs": [
                      {
                          "name": "TextTab",
                          "required": "true",
                          "locked": "false",
                          "tabLabel": "gjk",
                          "fontSize": "Size12",
                          "documentId": "1136641236",
                          "pageNumber": "1",
                          "anchorString": "TEXTTABPLACEHOLDER",
                          "anchorCaseSensitive": "True",
                          "anchorMatchWholeWord": "True"
                      }
                  ]
              },
              "name": "name",
              "email": "emailid",
              "recipientId": "2044556663",
              "routingOrder": "1"
          }
      ]
  },
  "customFields": {
      "textCustomFields": [
          {
              "fieldId": "788788",
              "name": "AppNumber",
              "show": "false",
              "required": "false",
              "value": "788788"
          }
      ]
  },
  "brandId": "BrandId",
  "status": "sent",
  "emailSubject": "ABC Agreement",
  "emailBlurb": "Please Sign",
  "notification": {
      "reminders": {
          "reminderEnabled": "true",
          "reminderDelay": "1",
          "reminderFrequency": "2"
      },
      "expirations": {
          "expireEnabled": "true",
          "expireAfter": "2",
          "expireWarn": "1"
      }
  }
}