第三方应用开发
基础
数据与智能专区
应用接收专区通知
连接微信
客户联系
办公
小程序接入对外收款
第三方应用开发
服务端API
文档
管理智能表格内容
更新字段
更新字段
最后更新:2025/06/06

目录

  • 更新字段
  • 参数详细说明
  •       UpdateField
  • 更新字段

    本接口用于更新智能中的某个子表里的一个或多个字段的标题和字段属性信息。
    注意
    该接口只能更新字段名、字段属性,不能更新字段类型。

    请求方式:POST(HTTPS)
    请求地址:https://qyapi.weixin.qq.com/cgi-bin/wedoc/smartsheet/update_fields?access_token=ACCESS_TOKEN

    请求包体:

    {
    	"docid": "DOCID",
    	"sheet_id": "SHEETID",
    	"fields": [{
    		"field_id": "FIELD_ID",
    		"field_title": "TITLE",
    		"field_type": "FIELD_TYPE_TEXT"
    	}]
    }

    参数说明

    参数类型是否必须说明
    docidstring是文档的docid
    sheet_idstring是表格ID
    fieldsobject [](UpdateField)是字段详情

     

    权限说明

    • 自建应用需配置到“可调用应用”列表中的应用secret所获取的accesstoken来调用(accesstoken如何获取?)
    • 第三方应用需具有“文档”权限
    • 代开发自建应用需具有“文档”权限

    返回示例

    {
    	"errcode": 0,
    	"errmsg": "ok",
    	"fields": [{
    		"field_id": "FIELDID",
    		"field_title": "TITLE",
    		"field_type": "FIELD_TYPE_TEXT"
    	}]
    }

    参数说明

    参数类型说明
    errcodeint32错误码
    errmsgstring错误码说明
    fieldsobject [](Field)字段详情

    参数详细说明

    UpdateField

    字段信息:
    注意
    字段属性与字段类型是匹配的,一种字段类型对应一种字段属性
    更新时field_title和property_number至少需要传一个,field_title不能被更新为原值

     

    参数名类型是否必填描述
    field_idstring是字段 ID,更新字段属性时需要填写该字段,但字段 ID 不能被更新
    field_titlestring否字段标题,需要更新为的字段标题
    field_typestring是字段类型,见FieldType ,必须为原属性
    property_textobject否文本 类型的字段属性为空
    property_numberobject(NumberFieldProperty)否数字 类型的字段属性
    property_checkboxobject(CheckboxFieldProperty)否复选框 类型的字段属性
    property_date_timeobject(DateTimeFieldProperty)否日期 类型的字段属性
    property_attachmentobject(AttachmentFieldProperty)否文件 类型的字段属性
    property_userobject(UserFieldProperty)否人员 类型的字段属性
    property_urlobject(UrlFieldProperty)否超链接 类型的字段属性
    property_selectobject(SelectFieldProperty)否多选 类型的字段属性
    property_created_userobject否创建人 类型的字段属性为空
    property_modified_userobject否最后编辑人 类型的字段属性为空
    property_created_timeobject(CreatedTimeFieldProperty)否创建时间 类型的字段属性
    property_modified_timeobject(ModifiedTimeFieldProperty)否最后编辑时间 类型的字段属性
    property_progressobject(ProgressFieldProperty)否进度 类型的字段属性
    property_single_selectobject(SingleSelectFieldProperty)否单选 类型的字段属性
    property_referenceobject(PropertyReference)否引用 类型的字段属性
    property_locationobject(LocationFieldProperty)否地理位置 类型的字段属性
    property_auto_numberobject(AutoNumberFieldProperty)否自动编号 类型的字段属性
    property_currencyobject(CurrencyFieldProperty)否货币 类型的字段属性
    property_ww_groupobject(WwGroupFieldProperty)否群 类型的字段属性
    property_percentageobject(PercentageFieldProperty)否百分数 类型的字段属性
    property_barcodeobject(BarcodeFieldProperty)否条码 类型的字段属性
    上一篇删除字段
    下一篇添加记录
      本节内容
    服务端API
    基础
    数据与智能专区
    应用接收专区通知
    连接微信
    客户联系
    办公
    小程序接入对外收款
    客户端API
    小程序
    基础
    连接微信
    办公
    JS-SDK
    基础
    连接微信
    办公
    数据API
    更新日志