智简魔方文档

GET 产品详情

接口概览

项目内容
文档类型后台接口
请求方式GET
接口地址/DIR_ADMIN/v1/host/{id}
所属业务产品管理
来源模块/系统产品管理
认证方式Bearer Token(管理员令牌)

完整请求

请求

bash
正在加载示例…

失败请求

bash
正在加载示例…

接口说明

产品详情

请求参数

名称位置类型必选说明
idpathinteger(int32)是产品 ID

成功响应

json
正在加载示例…

失败响应 400:请求参数或业务校验失败

json
正在加载示例…

失败响应 401:未认证或登录已失效

json
正在加载示例…

失败响应 403:无权执行当前操作

json
正在加载示例…

失败响应 404:接口或业务资源不存在

json
正在加载示例…

失败响应 500:服务器内部错误

json
正在加载示例…

响应状态

状态码状态码含义说明数据模型
200OK成功响应内联对象
400Bad Request请求参数或业务校验失败内联对象
401Unauthorized未认证或登录已失效内联对象
403Forbidden无权执行当前操作内联对象
404Not Found接口或业务资源不存在内联对象
500Internal Server Error服务器内部错误内联对象

响应参数

状态码 200

名称类型必选约束说明
hostobject否—产品
host.idinteger(int32)否—产品 ID
host.order_idinteger(int32)否—订单 ID
host.product_idinteger(int32)否—商品 ID
host.server_idinteger(int32)否—接口 ID
host.namestring否—标识
host.notesstring否—备注
host.first_payment_amountstring否—订购金额
host.renew_amountstring否—续费金额
host.billing_cyclestring否—计费周期
host.billing_cycle_namestring否—模块计费周期名称
host.billing_cycle_timestring否—模块计费周期时间
host.active_timeinteger(int32)否—开通时间
host.due_timeinteger(int32)否—到期时间
host.statusstring否—状态 Unpaid未付款 Pending开通中 Active已开通 Suspended已暂停 Deleted已删除 Failed开通失败 Grace宽限 Keep保留
host.suspend_typestring否—暂停类型 overdue到期暂停 overtraffic超流暂停 certification_not_complete实名未完成 other其他
host.suspend_reasonstring否—暂停原因
host.client_notesstring否—用户备注
host.ratio_renewinteger(int32)否—是否开启比例续费 0否 1是
host.base_pricestring否—购买周期原价
host.product_namestring否—商品名称
host.agentinteger(int32)否—代理产品 0否 1是
host.upstream_host_idstring否—上游产品 ID
host.modestring否—商品代理模式 only_api仅调用接口 sync同步商品
host.renew_forbiddeninteger(int32)否—是否禁止续费 0允许 1禁止
host.keep_time_pricestring否—保留期价格
host.on_demand_flow_pricestring否—按需流量价格
host.on_demand_billing_cycle_unitstring否—出账周期单位 hour每小时 day每天 month每月
host.on_demand_billing_cycle_dayinteger(int32)否—出账周期号数
host.on_demand_billing_cycle_pointstring否—出账周期时间点 如00:00
host.additionobject否——
host.addition.country_idinteger(int32)否—国家 ID
host.addition.citystring否—城市
host.addition.areastring否—区域
host.addition.image_iconstring否—镜像图标
host.addition.image_namestring否—镜像名称
status[string] | integer(int32)否—状态列表
self_defined_field[object]否——
self_defined_field[].idinteger(int32)否—自定义字段 ID
self_defined_field[].field_namestring否—字段名称
self_defined_field[].field_typestring否—字段类型 text文本框 link链接 password密码 dropdown下拉 checkbox勾选框 textarea文本区
self_defined_field[].descriptionstring否—字段描述
self_defined_field[].field_optionstring否—下拉选项
self_defined_field[].is_requiredinteger(int32)否—是否必填 0否 1是
self_defined_field[].valuestring否—当前值
msgstring否—提示信息
dataobject否——
data.hostobject否——
data.status[string]否——
data.self_defined_field[任意类型]否——

失败状态码 400、401、403、404、500 共用以下结构:

名称类型必选约束说明
statusinteger(int32)是—错误状态码
msgstring是—错误提示