Hello Stack Overflow world,
我目前正在尝试撤回与我创建的模板相关联的所有自定义字段,但我一直在获取一个没有数据的200代码。有谁知道我做错了什么?
端点:
获取/v2/accounts/{myaccountID}/templates/{mytemplateId}/custom_fields
标题:{"accept":"application/json", "Content-Type":"application/json"}
响应标题:
{
"cache-control": "no-cache",
"content-length": "57",
"content-type": "application/json; charset=utf-8",
"x-ratelimit-reset": "1518814800",
"x-ratelimit-limit": "1000",
"x-ratelimit-remaining": "999",
"x-docusign-tracetoken": "{redacted}",
"date": "Fri, 16 Feb 2018 20:00:27 GMT",
"connection": "close",
"strict-transport-security": "max-age=31536000; includeSubDomains"
}
体:
{}
答案 0 :(得分:1)
您已发布的请求(GET /v2/accounts/{myaccountID}/templates/{mytemplateId}/custom_fields
)将返回该模板包含的任何信封自定义字段。 信封自定义字段是textCustomFields
和/或listCustomFields
的集合,可用于指定任何对于任何收件人都不可用/不可见的信封的元数据办法。这真的是您打算检索的数据类型吗?
如果您并不打算检索信封自定义字段(如上所述),而是想要检索文档中收件人可见的标签(字段)( s)信封,然后你应该使用获取模板请求:
GET /v2/accounts/{myaccountID}/templates/{mytemplateId}
响应正文将包含模板的所有信息,包括包含recipients
数组的(顶级)signers
属性。对于指定的每个签名者,tabs
属性将包含分配给该签名者的选项卡(字段)。对于该示例,以下JSON显示模板的获取模板响应的recipients
部分,该模板包含仅分配了一个文本选项卡的单个签名者。
{
...
"recipients": {
"signers": [
{
"tabs": {
"textTabs": [
{
"height": 33,
"isPaymentAmount": "false",
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"requireAll": "false",
"value": "",
"originalValue": "",
"width": 60,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"maxLength": 100,
"tabLabel": "Address",
"font": "lucidaconsole",
"bold": "false",
"italic": "false",
"underline": "false",
"fontColor": "black",
"fontSize": "size9",
"documentId": "92876756",
"recipientId": "72490903",
"pageNumber": "1",
"xPosition": "70",
"yPosition": "40",
"tabId": "879ff828-53d2-40af-97a7-a9b1f71a1a87",
"templateLocked": "false",
"templateRequired": "false"
}
]
},
...
}
],
...
},
...
}