订单列表
GET
/pub/order/list
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| page_no | query | integer | 否 | none |
| page_size | query | integer | 否 | none |
| trade_no | query | string | 否 | 订单编号 |
| status | query | integer | 否 | 订单状态 |
| product_type | query | integer | 否 | 产品类型 |
详细说明
status: 订单状态
| 状态 | 描述 |
|---|---|
| 0 | 待支付 |
| 1 | 已支付 |
| 2 | 超时未支付已取消 |
| 3 | 已退款 |
product_type: 产品类型 | 产品类型 | 描述 | |---|---| |3|余额充值| |9|动态流量套餐| |11|动态全球包时套餐V2| |12|长效IDC流量套餐| |13|住宅静态IP流量套餐| |14|数据中心静态IP套餐| |15|长效ISP流量套餐| |16|静态流量套餐| |17|动态IP数量套餐| |18|web-scraper| |19|静态IP续费| |20|静态IP更换配额| |21|静态流量套餐v2| |24|静态流量附加包套餐| |25|住宅静态IP套餐| |26|补单 - 部分支付渠道需要用户手动填写金额,如:虚拟币,若发生短款,需要联系客服通过此种产品进行补支付| |27|Serp| |28|Video|
枚举值
| 属性 | 值 |
|---|---|
| status | 0 |
| status | 1 |
| status | 2 |
| status | 3 |
| product_type | 3 |
| product_type | 9 |
| product_type | 11 |
| product_type | 12 |
| product_type | 14 |
| product_type | 16 |
| product_type | 17 |
| product_type | 18 |
| product_type | 19 |
| product_type | 21 |
| product_type | 24 |
| product_type | 25 |
| product_type | 26 |
| product_type | 27 |
| product_type | 28 |
返回示例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"list": [
{
"id": 0,
"trade_no": "string",
"product_id": 0,
"product_name": "string",
"total_fee": 0.1,
"pay_fee": 0.1,
"status": 0,
"created_at": "2019-08-24T14:15:22Z"
}
],
"pagination": {
"total": 0,
"page_no": 0,
"page_size": 0,
"total_pages": 0
}
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
创建订单
POST
/pub/order/create
因套餐种类较多,且每种套餐存在不同的配置,请根据实际情况填写参数。不正当填写参数可能导致订单创建失败。
examples:
续费静态IP
{
"pid": x, // 联系客服获取
"upids": "1,2,3,4,5,6", // 从 /pub/ip/get-static-ip 获取对应的ID
"pm_id": 1 // 从 /pub/payment/list 获取
"coupon_sn: "xxx", // 可选 优惠券
}
Body 请求参数
{
"pid": 0,
"upids": "string",
"amount": 0,
"pm_id": 0,
"region_list": "string",
"coupon_sn": "string",
"use_invitation_registration_discount": true,
"renew_duration": 0,
"product_sku_bandwidth_id": 0,
"product_sku_concurrency_id": 0,
"recharge_amount": 0
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| body | body | object | 是 | none |
| » pid | body | integer | 是 | 套餐ID |
| » upids | body | string | 否 | 续费套餐ID列表 |
| » amount | body | number | 否 | 新购套餐数量 |
| » pm_id | body | integer | 是 | 支付方式ID |
| » region_list | body | string | 否 | 购买静态IP时指定区域+数量 |
| » coupon_sn | body | string | 否 | 优惠券编号 |
| » use_invitation_registration_discount | body | boolean | 否 | 是否使用邀请注册优惠 |
| » renew_duration | body | integer | 否 | 续费时长-静态IP可选 |
| » product_sku_bandwidth_id | body | integer | 否 | 套餐11:带宽套餐ID |
| » product_sku_concurrency_id | body | integer | 否 | 套餐11:并发套餐ID |
| » recharge_amount | body | integer | 否 | 套餐3:充值金额 |
返回示例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"id": 0,
"trade_no": "string",
"product_id": 0,
"product_name": "string",
"total_fee": 0.1,
"pay_fee": 0.1,
"status": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 创建成功 | Inline |
返回数据结构
取消订单
POST
/pub/order/close
Body 请求参数
{
"trade_no": "string"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| body | body | object | 是 | none |
| » trade_no | body | string | 是 | none |
返回示例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 操作成功 | SuccessResponse |
