Skip to content

查询订单详情

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

请求

GET /open-api/v1/orders/{orderId}

路径参数

参数类型必填说明
orderIdlong订单 ID

请求参数

参数类型必填说明
merchantIdlong商户 ID(需传入订单所属商户,用于权限校验)

请求示例

bash
curl -X GET 'https://openapi.example.com/open-api/v1/orders/9001?merchantId=1001' \
  -H 'X-App-Key: ak_1234567890abcdef' \
  -H 'X-Timestamp: 1709280000' \
  -H 'X-Nonce: a1b2c3d4' \
  -H 'X-Sign: calculated_signature'

响应

响应参数

字段类型说明
idlong订单 ID
merchantIdlong商户 ID
storeIdlong门店 ID
totalAmountint总金额(分)
statusint订单状态(见下方状态说明)
itemsarray订单明细列表
items[].itemTypeint商品类型
items[].itemIdlong关联 ID
items[].itemNamestring商品/服务名称
items[].priceint单价(分)
items[].quantityint数量
remarkstring备注
createTimestring创建时间
payTimestring支付时间
completeTimestring完成时间

订单状态说明

状态值说明
0待支付
1已支付
2服务中
3已完成
4已取消
5已退款

响应示例

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "id": 9001,
    "merchantId": 1001,
    "storeId": 2001,
    "totalAmount": 29900,
    "status": 1,
    "items": [
      {
        "itemType": 1,
        "itemId": 4001,
        "itemName": "深层清洁护理",
        "price": 29900,
        "quantity": 1
      }
    ],
    "remark": "下午3点到店",
    "createTime": "2026-03-10T15:00:00+08:00",
    "payTime": "2026-03-10T15:01:30+08:00",
    "completeTime": null
  }
}

相关接口

接口路径说明
查询订单状态历史GET /open-api/v1/orders/{orderId}/status-history?merchantId=获取订单状态流转记录
申请退款POST /open-api/v1/orders/{orderId}/refund?merchantId=对已支付订单申请退款
核销订单POST /open-api/v1/orders/{orderId}/write-off?merchantId=核销服务类订单

商数通开放平台