#### 接口版本: |版本号|制定人|修订日期|说明| |:----|:----|:---- |:----| |1.0 |Karen |2021-11-05 |建立文档| #### 请求URL: - {{HOST}}/api/user/orders #### 请求方式: - POST #### 请求头: |参数名|是否必须|类型|说明| |:---- |:---|:----- |----- | |Content-Type |是 |string |application/json | |Accept |是 |string |application/json | |Authorization|是|string|Bearer {token},`登录`接口获取| |uuid |否 |string |uuid,每个接口都会通过 headers 头返回 | |locale |否 |string |语言,默认 en,更多配置查看文件 `/config/strongshop.php` 中 `langs`| |currency |否 |string |货币,默认 USD,更多配置查看文件 `/config/strongshop.php` 中 `currencies`| #### 请求参数: |参数名|是否必须|类型|说明| |:---- |:---|:----- |----- | #### 返回示例: **正确时返回:** ``` { "code": 200, "message": "Success", "data": { "current_page": 1, "data": [ { "id": 50, "order_no": "ST20211104150518924", "currency_code": "USD", "order_amount": "49.780",//订单金额 "paid_amount": "0.000",//实际支付金额 "order_status": 10,//订单状态:10 待支付,12 已支付/待发货,13 支付失败,14 支付异常,20 已发货/待收货,22 已收货,24 退货中,26 已退货,30 已完成,40 已取消(会员取消),42 已关闭(管理员关闭) "created_at": "2021-11-04 15:05:55", "payment_option_id": 1, "country": "", "state": "", "currency": "$USD", "order_status_label": "待支付", "order_status_style": "layui-bg-orange", "order_products": [ { "product_id": 1, "order_id": 50, "sku": "dress100-01-s", "title": "Womens Mini Dress Batwing Boat Neck Long Sleeve Tunic Shift Dress Black-S", "sale_price": "10.778", "qty": 1, "img_cover": "http://demo.strongshop.local/storage/202103/rx0xVDd18IOOT5sxAT7M9QAQUFCczeFJWhAz2p8g_thumb.jpg", "specs": [ { "name": "颜色", "value": "Black" }, { "name": "尺寸", "value": "S" }, { "name": "3333", "value": "1" } ], "subtotal": "10.778" } ], "payment_option": { "id": 1, "code": "paypal" } } ], "first_page_url": "http://demo.strongshop.local/api/user/orders?page=1", "from": 1, "last_page": 3, "last_page_url": "http://demo.strongshop.local/api/user/orders?page=3", "next_page_url": "http://demo.strongshop.local/api/user/orders?page=2", "path": "http://demo.strongshop.local/api/user/orders", "per_page": 5, "prev_page_url": null, "to": 5, "total": 12 } } ``` #### 返回CODE说明: |参数名|说明| |:----- |----- | |200 |成功 | |3001 |字段验证错误 | |5001|服务内部错误| #### 备注: - 更多返回错误代码请看首页的错误代码描述