云速成

会员接口

我的订单

查询会员订单、下单、发起支付与取消订单。

获取我的订单列表

GET/_api/member/orders会员接口

分页获取当前会员的订单,可按状态筛选。

Query 参数

参数类型必填说明
pageinteger否页码。
pageSizeinteger否每页条数。
statusstring否pending / processing / shipped / completed / cancelled。

响应示例

{
  "items": [
    {
      "id": "c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f",
      "orderNumber": "SO202601050001",
      "memberId": "b1c2d3e4-f5a6-7b8c-9d0e-1f2a3b4c5d6e",
      "memberName": "zhangsan",
      "productSummary": "云·企业官网 标准版 等 1 件",
      "status": "pending",
      "paymentStatus": "pending",
      "remark": null,
      "totalAmount": 1992,
      "currency": "cny",
      "createdAt": "2026-01-05T06:00:00Z",
      "cloudServiceId": null,
      "cloudServiceManageable": false,
      "cloudService": null
    }
  ],
  "page": 1,
  "pageSize": 10,
  "total": 1,
  "totalPages": 1
}

创建订单

POST/_api/member/orders会员接口

按 SKU 报数量下单。收货地址可传地址簿 Id,或直接填写收件人字段。

请求体字段

参数类型必填说明
itemsCheckoutItemInput[]是购买项(productSkuId + quantity),至少一项。
memberAddressIduuid否地址簿地址 Id;传了则忽略下方收件人字段。
recipientNamestring否收件人姓名。
recipientPhonestring否收件人电话。
recipientProvincestring否省份。
recipientCitystring否城市。
recipientDistrictstring否区/县。
recipientDetailAddressstring否详细地址。
couponCodestring否优惠券编码;留空表示不用券。

请求示例

{
  "items": [{ "productSkuId": "5e6f7081-92a3-b4c5-d6e7-f8091a2b3c4d", "quantity": 1 }],
  "recipientName": "张三",
  "recipientPhone": "13800000000",
  "recipientProvince": "山东省",
  "recipientCity": "济宁市",
  "recipientDistrict": "任城区",
  "recipientDetailAddress": "示例路 1 号",
  "saveToAddressBook": true,
  "setAsDefaultAddress": true,
  "remark": "工作日送货",
  "couponCode": null
}

响应示例

{
  "id": "c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f",
  "orderNumber": "SO202601050001",
  "status": "pending",
  "paymentStatus": "pending",
  "totalAmount": 1992,
  "shippingFee": 12,
  "currency": "cny",
  "recipientAddress": "山东省济宁市任城区示例路 1 号",
  "createdAt": "2026-01-05T06:00:00Z",
  "items": []
}

获取订单详情

GET/_api/member/orders/{id}会员接口

获取当前会员的订单详情,含收货信息、物流与订单项。

路径参数

参数类型必填说明
iduuid是订单 Id。

响应示例

{
  "id": "c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f",
  "orderNumber": "SO202601050001",
  "memberId": "b1c2d3e4-f5a6-7b8c-9d0e-1f2a3b4c5d6e",
  "memberName": "zhangsan",
  "status": "pending",
  "paymentStatus": "pending",
  "totalAmount": 1992,
  "shippingFee": 12,
  "couponCode": null,
  "currency": "cny",
  "recipientName": "张三",
  "recipientPhone": "13800000000",
  "recipientAddress": "山东省济宁市任城区示例路 1 号",
  "shippingCarrier": null,
  "trackingNumber": null,
  "shippedAt": null,
  "remark": "工作日送货",
  "createdAt": "2026-01-05T06:00:00Z",
  "updatedAt": "2026-01-05T06:00:00Z",
  "items": [
    {
      "id": "d2e3f4a5-b6c7-8d9e-0f1a-2b3c4d5e6f70",
      "productId": "3c4d5e6f-7081-92a3-b4c5-d6e7f8091a2b",
      "productSkuId": "5e6f7081-92a3-b4c5-d6e7-f8091a2b3c4d",
      "skuCode": "GW-BASIC",
      "skuSpecLabel": "标准版 / 1 年",
      "productName": "云·企业官网 标准版",
      "unitPrice": 1980,
      "quantity": 1,
      "lineTotal": 1980,
      "reviewId": null,
      "reviewStatus": null
    }
  ],
  "cloudServices": []
}

发起订单支付

POST/_api/member/orders/{id}/pay会员接口

发起在线支付,返回支付宝跳转地址或微信 Native 二维码内容。

路径参数

参数类型必填说明
iduuid是订单 Id。

请求体字段

参数类型必填说明
channelstring是支付渠道:alipay / wechat / paypal。

请求示例

{ "channel": "alipay" }

响应示例

{
  "channel": "alipay",
  "outTradeNo": "SO202601050001",
  "amount": 1992,
  "payUrl": "https://openapi.alipay.com/gateway.do?...",
  "codeUrl": null
}
  • alipay / paypal 返回 payUrl,前端直接跳转;wechat 返回 codeUrl,需渲染成二维码。

取消订单

PUT/_api/member/orders/{id}/cancel会员接口

取消尚未发货的订单。

路径参数

参数类型必填说明
iduuid是订单 Id。

响应示例

{ "id": "c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f", "orderNumber": "SO202601050001", "status": "cancelled", "paymentStatus": "pending" }