文档
测试

保存问卷接口

POST
http://zqh.5rkk.com/question/api/v1/questionnaires

请求参数

multipart/form-data
参数名
类型
描述
必填
name
string
问卷标题
可选
timed_collection_begin_time
string
收集开始时间
可选
timed_collection_end_time
string
收集截止时间
可选
describe
string
欢迎语
可选
describe_back
string
结束语
可选
project_key
string
问卷id,修改必传
可选
items
string
问卷题目集合
可选
form_item_id
int
服务器分配id,新增不传,修改要传
可选
label
string
标题
必填
required
bool
1
必填
show_label
bool
1
必填
span
int
24 栅栏数量
必填
type
string
INPUT
必填
sort
int
排序
必填
items_del
array
[form_item_id]
可选
pub_mode
int
发布方式: 0:审核通过后自动发布 1:手动发布 2:设置发布时间发布
可选
background_img
string
封面图
可选
collection_status
int
搜集方式: 0:没有定义(待发布) 1:开始收集 2:停止收集
可选
is_show_stat
int
是否允许查看统计数据 0:不允许;1:允许
可选

响应参数

参数名
类型
描述
必填
project_key
string
问卷id,必反回。同时返回问卷详细信息
必填

说明 / 示例

```language { "code": 200, "msg": "请求成功", "data": { "project_key": "d9286ee117b2fceb81460d6639c2f650", "name": "我做的问卷2", "describe": "我的开始描述1", "describe_back": "我的后续描述333", "pub_mode": 1, "timed_collection_begin_time": null, "timed_collection_end_time": null, "background_img": "http://www.baidu.com", "items": [ { "type": "INPUT", "label": "这个东西到底好不好吃?", "placeholder": null, "default_value": null, "required": 1, "show_label": 1, "span": 24, "form_item_id": "102", "sort": 8, "expand": "{\"maxlength\": 102}" }, { "type": "INPUT", "label": "这个东西到底好不好吃?", "placeholder": null, "default_value": null, "required": 1, "show_label": 1, "span": 24, "form_item_id": "103", "sort": 8, "expand": "{\"maxlength\": 102}" }, { "type": "INPUT", "label": "这个东西到底好不好吃?", "placeholder": null, "default_value": null, "required": 1, "show_label": 1, "span": 24, "form_item_id": "104", "sort": 8, "expand": "{\"maxlength\": 102}" } ] } } ```