====JSON格式====
^名称 ^类型 ^注释 ^
|id |int |字段id,字段在创建的时候由系统自动分配,系统字段默认为1 |
|url |varchar |字段的资源url |
|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/companies/company_fields.json
**调用者权限**
管理员
**调用示例**
curl https://www.bangwo8.com/api/v1/companies/company_fields.json -u {account}:{password}
**返回值示例**
Status: 200 OK
{
"company_fields":[
{
"id":"1",
"name":"公司名称",
"key":"companyName",
"type":"2",
"system":"1",
"custom_field_options":[
]
},
{
"id":"24797907",
"name":"公司类型",
"key":"field_2",
"type":"1",
"system":"0",
"custom_field_options":[
{
"key":"4457111",
"value":"互联网"
},
{
"key":"4457115",
"value":"金融"
}
]
},
{
"id":"24797963",
"name":"地址",
"key":"field_4",
"type":"18",
"system":"0",
"custom_field_options":[
{
"key":"1",
"value":"北京市",
"subset_value":[
{
"key":"403",
"value":"海淀区",
"subset_value":[
{
"key":"3230",
"value":"中关村"
},
{
"key":"3231",
"value":"清华"
},
{
"key":"3232",
"value":"北大"
}
]
}
]
}
]
}
]
}