获取订单详情


接口说明

获取指定订单号的订单详细信息

该接口需要在APP后台启用登录

注意事项

  1. 只能查询当前登录用户自己的订单
  2. 价格单位为分
  3. 需要提供完整的订单号

请求路径

Method URI Path 鉴权方式
GET /v1/order/info Token认证

请求参数

公共参数

参数名 类型 取值范围 是否必须 说明
Authorization string Bearer + token 登录令牌,Header传值,格式:Bearer eyJxx...

业务参数

参数名 类型 是否必须 取值范围 默认值 说明
oid string - - 订单ID
need_product_info integer 0,1 0 是否需要返回商品信息

请求示例代码

curl --location --request GET 'https://api.zaihangyun.com/v1/order/info?oid=aabc-12025050421492698442542' \
--header 'Accept: application/json' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Authorization: Bearer ZaihangyunToken' \
--header 'Host: api.zaihangyun.com' \
--header 'Connection: keep-alive'

返回响应

{
    "code": 200,
    "msg": "success",
    "data": {
        "oid": "aabc-1aabc2025050421492698442542",
        "uid": 1857248324,
        "product_id": 267370,
        "product_price": 1900,
        "discount_amount": 0,
        "order_amount": 1900,
        "payment_amount": 1900,
        "platform_order_amount": null,
        "status": 1,
        "pay_channel": 1,
        "tid": null,
        "trade_type": null,
        "bank_type": null,
        "open_id": null,
        "channel": "official",
        "pay_time": null,
        "updated_at": null,
        "created_at": "2025-05-04 13:49:27",
        "product_info": {               //need_product_info为0,则无此字段
            "pid": 267370,
            "name": "永久会员修改",
            "sub_name": "月会员",
            "type": 1,
            "function_value": "30",
            "cross_price": 9900,
            "sale_price": 1900,
            "desc": null,
            "sale_status": 1,
            "platform_type": 1,
            "ext_data": "{\"test\":\"test\"}"
        }
    }
}
  • 错误返回
{
    "code": 401,
    "msg": "Unauthorized"
}

错误码说明

查看全局错误码

错误码 说明
400101 oid参数缺失
400102 oid参数类型必须是字符串
400103 need_product_info参数类型必须是整数
400109 need_product_info参数值必须是0或1
400199 订单不存在