**版本：202201**

# 查询退款记录列表

**GET** `/openapi/2022-01/orders/refund_records`

返回所有订单的退款记录，支持按订单 ID、退款记录 ID、状态、排序字段与方向、 创建/更新时间范围过滤，使用 cursor 分页。

## 请求

**Query参数**

- `order_ids` string

  按订单 ID 过滤，最多支持 10 个。
- `refund_record_ids` string

  Refund record id, comma-separated, A maximum of 20 ids are supported, for example: '396114279473883074,400561078532063170'.
- `refund_status` string

  Refund record status, comma-separated, status support: `pending`, `finished`, `failed`
- `page` string

  Page number
- `per_page` string

  Limit per page, maximum: `100`
- `sort_by` string

  排序字段。

  *   created_at: 按创建时间排序。
  *   updated_at: 按更新时间排序。
- `sort_direction` string

  排序方向。

  *   desc: 降序。
  *   asc: 升序。
- `created_at_start` string

  按创建时间过滤的起始值（如 2018-11-02T12:30:10Z）。
- `created_at_end` string

  按创建时间过滤的结束值（如 2018-11-02T12:30:10Z）。
- `updated_at_start` string

  按最后更新时间过滤的起始值（如 2018-11-02T12:30:10Z）。
- `updated_at_end` string

  按最后更新时间过滤的结束值（如 2018-11-02T12:30:10Z）。

## 响应

**200 | 422**

200

**application/json**

**数据结构 | 示例 | Result**

**数据结构**

- `records` object[]

  *   Array [

  - `id` string

    **示例：** `400561078532063170`
  - `refund_price` string

    **示例：** `2.00`
  - `refund_shipping` string

    **示例：** `1.00`
  - `refund_shipping_tax` string

    **示例：** `0.00`
  - `refund_method` string

    **示例：** `customize`
  - `refund_status` string

    **示例：** `finished`
  - `note` string

    **示例：** `11111111`
  - `created_at` string

    **示例：** `2024-07-10T08:06:43Z`
  - `updated_at` string

    **示例：** `2024-07-10T08:06:43Z`
  - `refund_line_items` object[]

    *   Array [

    - `line_item` object

      - `line_item_id` string

        **示例：**
      - `quantity` integer

        **默认值：** `0`

        **示例：** `0`
    - `tax` string

      **示例：**
    - `discount` string

      **示例：**
    - `sub_total` string

      **示例：**
    - `total` string

      **示例：**
    - `delete_quantity` string

      **示例：**
    *   ]
  - `payment_details` object[]

    *   Array [

    - `id` string

      **示例：** `400561078544646131`
    - `payment_line_id` string

      **示例：** `767c4f87-bd05-4592-9ab0-374d4183fe59`
    - `payment_channel` string

      **示例：** `bogus`
    - `payment_method` string

      **示例：** `bogus_gateway`
    - `refund_price` string

      **示例：** `2.00`
    - `refund_status` string

      **示例：** `finished`
    - `finished_at` string

      **示例：** `2024-07-10T08:06:43Z`
    *   ]
  - `additional_total` string

    **示例：** `0.00`
  - `additional_prices` object[]

    *   Array [

    - `name` string

      **示例：**
    - `price` string

      **示例：**
    - `biz_id` string

      **示例：**
    *   ]
  - `refund_tip` string

    **示例：** `0.00`
  - `order_id` string

    **示例：** `64770-00000022`
  *   ]

```json
{
  "records": [
    {
      "id": "400561078532063170",
      "refund_price": "2.00",
      "refund_shipping": "1.00",
      "refund_shipping_tax": "0.00",
      "refund_method": "customize",
      "refund_status": "finished",
      "note": "11111111",
      "created_at": "2024-07-10T08:06:43Z",
      "updated_at": "2024-07-10T08:06:43Z",
      "refund_line_items": [
        {
          "line_item": {
            "line_item_id": "",
            "quantity": 0
          },
          "tax": "",
          "discount": "",
          "sub_total": "",
          "total": "",
          "delete_quantity": ""
        }
      ],
      "payment_details": [
        {
          "id": "400561078544646131",
          "payment_line_id": "767c4f87-bd05-4592-9ab0-374d4183fe59",
          "payment_channel": "bogus",
          "payment_method": "bogus_gateway",
          "refund_price": "2.00",
          "refund_status": "finished",
          "finished_at": "2024-07-10T08:06:43Z"
        }
      ],
      "additional_total": "0.00",
      "additional_prices": [
        {
          "name": "",
          "price": "",
          "biz_id": ""
        }
      ],
      "refund_tip": "0.00",
      "order_id": "64770-00000022"
    }
  ]
}
```

```json
{
    "records": [
        {
            "id": "400561078532063170",
            "refund_price": "2.00",
            "refund_shipping": "1.00",
            "refund_shipping_tax": "0.00",
            "refund_method": "customize",
            "refund_status": "finished",
            "note": "11111111",
            "created_at": "2024-07-10T08:06:43Z",
            "updated_at": "2024-07-10T08:06:43Z",
            "refund_line_items": [
              {
                "line_item": {
                  "line_item_id": "",
                  "quantity": 0
               	},
                "tax": "",
                "discount": "",
                "sub_total": "",
                "total": "",
                "delete_quantity": ""
              }
            ],
            "payment_details": [
                {
                    "id": "400561078544646131",
                    "payment_line_id": "767c4f87-bd05-4592-9ab0-374d4183fe59",
                    "payment_channel": "bogus",
                    "payment_method": "bogus_gateway",
                    "refund_price": "2.00",
                    "refund_status": "finished",
                    "finished_at": "2024-07-10T08:06:43Z"
                }
            ],
            "additional_total": "0.00",
            "additional_prices": [
              {
                "name": "",
                "price": "",
                "biz_id": ""
              }
            ],
            "refund_tip": "0.00",
            "order_id": "64770-00000022"
        }
    ]
}
```

422

**application/json**

**数据结构 | 示例 | Result**

**数据结构**

- `errors` string[]

```json
{
  "errors": [
    "Page must be 0 or greater"
  ]
}
```

```json
{
  "errors": [
    "Page must be 0 or greater",
     "PerPage must be 0 or greater",
    "SortBy must be one of [created_at updated_at]"
  ]
}
```
