订单详情

接口描述
  • 订单详情
请求URL
  • /api/orders/{order}
请求方式
  • GET
请求头部
参数名 必选 类型 说明
Authorization string JWT token
REST 参数
参数名 必选 类型 说明
order int 订单ID
Query 请求参数
参数名 必选 类型 说明
include string 包含额外的数据: goods 商品,user 用户 ,orderDetails订单详情, address 订单相关的地址
inlude可以返回额外的数据, 多个使用 , 分隔, 比如: include=goods,user,orderDetails
多层关联可以是 . , 比如要获取订单细节的同时,还要获取细节关联的商品:include=orderDetails.goods

推荐使用的方式,获取订单细节及地址信息: include=orderDetails.goods,address
返回参数
参数名 必含 类型 说明
id int 自增长主键ID
order_no string 单号
user_id int 创建者
amount int 总价
status int 状态
address_id int 收货地址
express_type string 快递类型
express_no string 快递号
pay_time int 支付时间
pay_type string 支付类型
trade_no string 支付流水号
created_at timestamp 添加时间
updated_at timestamp 修改时间
返回示例
  • 状态码 200 请求成功
  {
    "id": 7,
    "order_no": "20210922101816835949",
    "user_id": 1,
    "amount": "9086.00",
    "status": 2,
    "address_id": 40,
    "express_type": null,
    "express_no": null,
    "pay_time": "2021-09-23 11:44:50",
    "pay_type": "支付宝",
    "trade_no": "2021092322001425560501700091",
    "created_at": "2021-09-22T03:16:16.000000Z",
    "updated_at": "2021-09-23T03:44:54.000000Z",
    "goods": {
        "data": [
            {
                "id": 22,
                "title": "Fugiat in saepe hic.",
                "category_id": 70,
                "description": "Repellat nulla atque non voluptatum.",
                "price": 245,
                "stock": 1568,
                "pics": [
                    "http://placeimg.com/640/480/any",
                    "http://placeimg.com/640/480/any",
                    "http://placeimg.com/640/480/any"
                ],
                "pics_url": [
                    "http://placeimg.com/640/480/any",
                    "http://placeimg.com/640/480/any",
                    "http://placeimg.com/640/480/any"
                ],
                "cover": "http://placeimg.com/640/480/any",
                "cover_url": "http://placeimg.com/640/480/any",
                "details": "Suscipit totam omnis molestias eos veniam et nihil sed. Ea velit doloremque quia debitis. Praesentium quam voluptatem consequatur. Eum repudiandae quis enim qui esse.\n\nTenetur autem nostrum quia sit. Illum sunt vero illo ipsa numquam quibusdam. Sint et quaerat ut soluta ut voluptatibus.\n\nCorporis in repellat et voluptates vero eos ducimus. Porro animi accusamus quod. Iste enim non nisi veritatis. Provident error labore ratione doloribus cumque qui ipsum. Aperiam enim eos sint ullam ratione enim est.\n\nIn ut exercitationem modi expedita. Porro quaerat est excepturi ut aperiam possimus qui. Facere ut quis placeat earum eaque.",
                "is_on": 1,
                "is_recommend": 1,
                "created_at": "2021-09-17T01:49:16.000000Z",
                "updated_at": "2021-09-24T05:19:45.000000Z"
            },
            {
                "id": 23,
                "title": "Officia ullam vel.",
                "category_id": 74,
                "description": "Vel eum nostrum quam repellat.",
                "price": 756,
                "stock": 4275,
                "pics": [
                    "http://placeimg.com/640/480/any",
                    "http://placeimg.com/640/480/any",
                    "http://placeimg.com/640/480/any"
                ],
                "pics_url": [
                    "http://placeimg.com/640/480/any",
                    "http://placeimg.com/640/480/any",
                    "http://placeimg.com/640/480/any"
                ],
                "cover": "http://placeimg.com/640/480/any",
                "cover_url": "http://placeimg.com/640/480/any",
                "details": "Est eos incidunt voluptate reprehenderit. Quia et dicta quod nostrum laudantium quis praesentium. Qui consequatur aut vel.\n\nMagni enim animi sint eveniet quasi ut consequatur. Expedita molestiae atque aut blanditiis nihil laboriosam. Explicabo et rerum omnis molestiae error recusandae ut quos. Inventore distinctio aut et tenetur vitae vel iste.\n\nNeque laboriosam illo vero expedita. Maiores velit voluptatibus dolorem ipsum ipsa officiis eaque. Aspernatur eaque quidem possimus eos sint. Molestiae similique consequatur eos alias et repudiandae.\n\nPerferendis officiis magnam ex quo. Ut optio amet dolorum commodi eos velit mollitia. Perspiciatis velit dolorem nam porro ipsum rem. Ut sit culpa odit provident sequi suscipit. Voluptas corrupti voluptates voluptatem quasi.",
                "is_on": 1,
                "is_recommend": 1,
                "created_at": "2021-09-17T01:49:16.000000Z",
                "updated_at": "2021-09-23T03:29:05.000000Z"
            }
        ]
    }
}