订单

获取订单

GET /orders

查询参数

名称
类型
说明

页码

数值

页数

per_page(页数)

数值

每页返回订单数量

查询示例:

curl -X GET "https://resi-api.iproyal.com/v1/web-unblocker/orders?page=1&per_page=10" \
     -H "Authorization: Bearer <your_api_token>"

查询结果:

{
  "data": [
    {
      "id": 4,
      "note": null,
      "product_name": "Web Unblocker",
      "status": "confirmed",
      "amount": 9,
      "quantity": 10000,
      "created_at": "2025-06-26 10:01:50"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 20,
    "total": 1
  }
}

Create Order

POST /orders

正文参数:

名称
类型
说明

数量

数值

必填。查询数量。

coupon_code(优惠码)

字符串

请在此填写可用优惠码

card_id(卡号)

数值

选填。提供卡号,则使用对应卡片付款;否则我们将从账户余额中扣款。

查询示例:

curl -X POST https://resi-api.iproyal.com/v1/web-unblocker/orders \
     -H "Authorization: Bearer <your_api_token>" \
     -H "Content-Type: application/json" \
     -d '{"quantity": 10000}'

查询结果:

{
  "id": 4,
  "note": null,
  "product_name": "Web Unblocker",
  "status": "confirmed",
  "amount": 9,
  "quantity": 10000,
  "created_at": "2025-06-26 10:01:50"
}

计算价格

GET /orders/calculate-pricing

查询参数:

名称
类型
说明

quantity(数量)

数值

必填。订购数量。

coupon_code(优惠码)

字符串

选填。订单优惠码。

查询示例:

curl -X GET https://resi-api.iproyal.com/v1/web-unblocker/orders/calculate-pricing \
     -H "Authorization: Bearer <your_api_token>" \
     -H "Content-Type: application/json" \
     -d '{"quantity": 10000}'

查询结果:

{
  "total": 10
}

Last updated