跳转至

整机续费

接口说明

  • 功能: 整机租赁,订单创建
  • 请求URI: https://api.gpuez.com/zsc/open/api/v2/console/order/create
  • 请求方法: POST

鉴权

该接口需要通过 Basic 认证。请查看接口鉴权文档 接口鉴权

请求参数

参数 必选 类型 说明
machine_id true integer 机器ID,可请求整机管理/列表接口获取
order_type true integer 订单类型[6:整机续费]
product_type true integer 产品类型[4:整机]
rent_type true integer 租赁类型[4:包月](请与当前整机租赁类型保持一致)
rent_count true integer 租赁时长,包月传对应的租赁时长

返回字段

返回字段 字段类型 说明
code integer 错误码
message string 返回信息
trace string 请求ID
data.detail.rent_type integer 租赁类型 [4: 包月]
data.detail.rent_count integer 租赁时长,单位根据 rent_type 确定,分别为
data.detail.rent_free integer 租赁赠送时间,单位根据 rent_type 确定,分别为
data.detail.rent_start_at string 租赁起始时间
data.detail.rent_end_at string 租赁截止时间
data.detail.machine_id integer 主机ID
data.detail.machine_price string 租赁价格
data.detail.machine_amount string 租金金额
data.detail.machine_discount string 租金优惠
data.detail.machine_coupon_id integer 租金优惠券
data.detail.user_discount string 用户折扣,取值范围:0~1
data.detail.order_amount string 订单金额
data.detail.pay_amount string 支付金额
data.detail.refund_amount string 退款金额
data.detail.sno string 订单号

接口请求示例

请求示例:

curl --user 'ywpkds6mkks9whwwgqwbaxypqo03zklu:lchkswmht6evpk1csllxdntf6t9bzy0d' \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"machine_id":10007,"user_id":10178,"order_type":1,"product_type":4,"rent_type":4,"rent_count":1}' \
    "https://api.gpuez.com/zsc/open/api/v2/console/order/create"

返回示例:

{
  "code": 200,
  "msg": "success",
  "trace": "d1e6875b-8d52-4d7d-8bf2-c1790ce198eb",
  "data": {
    "detail": {
      "machine_amount": "2000",
      "machine_coupon_id": 0,
      "machine_discount": "140",
      "machine_id": 10007,
      "machine_price": "2000",
      "order_amount": "2000",
      "pay_amount": "1860",
      "refund_amount": "0",
      "rent_count": 1,
      "rent_end_at": "2025-04-09T16:50:53.105848+08:00",
      "rent_free": 0,
      "rent_start_at": "2025-04-02T16:50:54.105848+08:00",
      "rent_type": 3,
      "sno": "1685118541060000",
      "user_discount": "0.3"
    }
  }
}