会员接口
我的订单
查询会员订单、下单、发起支付与取消订单。
获取我的订单列表
GET
/_api/member/orders会员接口分页获取当前会员的订单,可按状态筛选。
Query 参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| page | integer | 否 | 页码。 |
| pageSize | integer | 否 | 每页条数。 |
| status | string | 否 | 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,或直接填写收件人字段。
请求体字段
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| items | CheckoutItemInput[] | 是 | 购买项(productSkuId + quantity),至少一项。 |
| memberAddressId | uuid | 否 | 地址簿地址 Id;传了则忽略下方收件人字段。 |
| recipientName | string | 否 | 收件人姓名。 |
| recipientPhone | string | 否 | 收件人电话。 |
| recipientProvince | string | 否 | 省份。 |
| recipientCity | string | 否 | 城市。 |
| recipientDistrict | string | 否 | 区/县。 |
| recipientDetailAddress | string | 否 | 详细地址。 |
| couponCode | string | 否 | 优惠券编码;留空表示不用券。 |
请求示例
{
"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}会员接口获取当前会员的订单详情,含收货信息、物流与订单项。
路径参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | uuid | 是 | 订单 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 二维码内容。
路径参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | uuid | 是 | 订单 Id。 |
请求体字段
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| channel | string | 是 | 支付渠道: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会员接口取消尚未发货的订单。
路径参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | uuid | 是 | 订单 Id。 |
响应示例
{ "id": "c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f", "orderNumber": "SO202601050001", "status": "cancelled", "paymentStatus": "pending" }