HTTP/HTTPS
请求协议
赤那接口平台 / Zny\ / [新增或编辑]
[新增或编辑]
接口地址:https://cnapi.shuidiwang.cn/api/app.php?s=Zny.Seed.Save
接口描述: 新增或编辑
接口参数
| 参数名字 | 类型 | 是否必须 | 默认值 | 其他 | 说明 |
|---|---|---|---|---|---|
| access_token | 字符串 | 可选 | 访问令牌,仅当开启签名验证时需要传递,生成令牌可使用App.Auth.ApplyToken接口 | ||
| id | 整型 | 可选 | - | 记录ID | |
| variety_category | 整型 | 必须 | - | 品种类别 | |
| variety_category_name | 字符串 | 必须 | - | 品种类别名称 | |
| number | 字符串 | 必须 | - | 审定编号 | |
| name | 字符串 | 必须 | - | 品种名称 | |
| province | 整型 | 必须 | - | 审定省ID | |
| province_name | 字符串 | 必须 | - | 审定省名称 | |
| years | 整型 | 必须 | - | 审定年份 | |
| unit | 整型 | 必须 | - | 审定单位ID | |
| unit_name | 字符串 | 必须 | - | 审定单位名称 | |
| source | 整型 | 必须 | - | 品种来源 | |
| is_transgenic | 枚举类型 | 必须 | - | 范围:0/1 | 是否转基因(1.是|0.否) |
| variety_category_type | 整型 | 必须 | - | 审定类别ID | |
| variety_category_type_name | 字符串 | 必须 | - | 审定类别名称 | |
| characteristic | 字符串 | 必须 | - | 特征特性 | |
| yield_performance | 字符串 | 必须 | - | 产量表现 | |
| technical_points | 字符串 | 必须 | - | 栽培技术要点 | |
| test_situation | 字符串 | 必须 | - | 试验情况 | |
| suitable_area | 字符串 | 必须 | - | 适宜地区 | |
| risk_warning | 字符串 | 必须 | - | 风险提示 | |
| audit_opinion | 字符串 | 必须 | - | 国家品审会审定意见 | |
| audit_opinion_time | 字符串 | 必须 | - | 国家品审会审定时间 | |
| validation_announcement_source | 字符串 | 必须 | - | 审定公告来源 | |
| main_producing_area | 字符串 | 必须 | - | 主产地区 | |
| status | 枚举类型 | 必须 | - | 范围:0/1 | 启用标志(1.启用|0.禁用) |
返回字段
| 返回结果 | 类型 | 说明 |
|---|---|---|
| ret | 整型 | 状态码,200表示成功,4xx表示客户端非法请求,5xx表示服务器错误 |
| data | 对象或混合类型 | 业务数据,由各自接口指定,通常为对象 |
| data.true|false | bool | |
| msg | 字符串 | 提示信息,失败时的错误提示 |
在线测试
| 参数 | 是否必须 | 值 |
|---|---|---|
| service | 必须 | |
| access_token | 可选 | |
| id | 可选 | |
| variety_category | 必须 | |
| variety_category_name | 必须 | |
| number | 必须 | |
| name | 必须 | |
| province | 必须 | |
| province_name | 必须 | |
| years | 必须 | |
| unit | 必须 | |
| unit_name | 必须 | |
| source | 必须 | |
| is_transgenic | 必须 | |
| variety_category_type | 必须 | |
| variety_category_type_name | 必须 | |
| characteristic | 必须 | |
| yield_performance | 必须 | |
| technical_points | 必须 | |
| test_situation | 必须 | |
| suitable_area | 必须 | |
| risk_warning | 必须 | |
| audit_opinion | 必须 | |
| audit_opinion_time | 必须 | |
| validation_announcement_source | 必须 | |
| main_producing_area | 必须 | |
| status | 必须 |
客户端请求示例
# 暂无示例,可添加示例文件:./src/view/docs/demos/Zny.Seed.Save.json错误列表
| 错误状态码 | 错误描述信息 |
|---|---|
| 400 | ret=400,客户端参数错误或非法请求 |
| 404 | 表示接口服务不存在 |
| 406 | ret=406,access_token令牌校验不通过 |
| 407 | ret=407,app_key权限不足,或未知应用 |
| 408 | ret=408,当前用户禁止使用,或用户未登录 |
| 500 | 表示服务端内部错误 |
本文档生成时间:2026-01-24 23:19:32