名称 | 类型 | 注释 |
---|---|---|
id | int | 字段id,字段在创建的时候由系统自动分配,系统字段默认为1 |
name | varchar | 字段名字 |
key | varchar | 字段的唯一标识 |
type | int | 字段类型,取值为:1-下拉列表,2-单行文本,3-多行文本,4-正整数,5-小数,6-复选框,7-正则表达式,8-日期(格式为:2018-02-03),12-附件,14-高级复选框,17-电话类型的文本,18-级联 |
system | tinyint | 是否为系统字段,取值为:1-系统字段,0-自定义字段 |
custom_field_options | array | 展示下拉列表选项或级联目录,如果字段类型是下拉列表,该字段会展示下拉列表的选项;如果字段是级联字段,会展示级联的多级目录;其他的字段类型展示为空。 |
GET /api/v1/users/user_fields.json
调用者权限
管理员
调用示例
curl http://www.bangwo8.com/api/v1/users/user_fields.json -u {account}:{password}
返回值示例
Status: 200 OK { "user_fields":[ { "id":"1", "name":"姓名", "key":"name", "type":"2", "system":"1", "custom_field_options":[ ] }, { "id":"24295921", "name":"authaccount", "key":"authaccount", "type":"2", "system":"0", "custom_field_options":[ ] }, { "id":"24795771", "name":"地区", "key":"field_3", "type":"18", "system":"0", "custom_field_options":[ { "key":"1", "value":"北京市", "subset_value":[ { "key":"26", "value":"海淀", "subset_value":[ { "key":"28", "value":"中关村" }, { "key":"29", "value":"清华" } ] }, { "key":"27", "value":"朝阳" } ] }, { "key":"6", "value":"吉林省" } ] }, { "id":"24799067", "name":"联系人类型(下拉列表)", "key":"field_4", "type":"1", "system":"0", "custom_field_options":[ { "key":"4457267", "value":"VIP" }, { "key":"4457271", "value":"普通联系人" } ] } ] }