**Version: 202201**

# Refund List

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

Returns refund records across all orders, paginated via cursor and filtered by order IDs, refund record IDs, status, sort field/direction, and create/ update time ranges.

## Request

**Query Parameters**

- `order_ids` string

  Order ids, comma-separated, a maximum of 10 ids are supported,for example, '183211-00000005,183211-00000006'.
- `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

  you can sort the result of record list by `created_at` or `updated_at`
- `sort_direction` string

  Sorting method, which value only `desc` or `asc` , `desc` for descending order, `asc` for ascending record.
- `created_at_start` string

  Filter records created at or after date, for example: `2016-01-18T23:41:00Z`
- `created_at_end` string

  Filter records created at or before date, for example: `2016-01-18T23:41:00Z`
- `updated_at_start` string

  Filter records last updated at or after date, for example: `2016-01-18T23:41:00Z`
- `updated_at_end` string

  Filter records last updated at or before date, for example: `2016-01-18T23:41:00Z`

## Responses

**200 | 422**

200

**application/json**

**Schema | Example | Result**

**Schema**

- `records` object[]

  *   Array [

  - `id` string

    **Example:** `400561078532063170`
  - `refund_price` string

    **Example:** `2.00`
  - `refund_shipping` string

    **Example:** `1.00`
  - `refund_shipping_tax` string

    **Example:** `0.00`
  - `refund_method` string

    **Example:** `customize`
  - `refund_status` string

    **Example:** `finished`
  - `note` string

    **Example:** `11111111`
  - `created_at` string

    **Example:** `2024-07-10T08:06:43Z`
  - `updated_at` string

    **Example:** `2024-07-10T08:06:43Z`
  - `refund_line_items` object[]

    *   Array [

    - `line_item` object

      - `line_item_id` string

        **Example:**
      - `quantity` integer

        **Default value:** `0`

        **Example:** `0`
    - `tax` string

      **Example:**
    - `discount` string

      **Example:**
    - `sub_total` string

      **Example:**
    - `total` string

      **Example:**
    - `delete_quantity` string

      **Example:**
    *   ]
  - `payment_details` object[]

    *   Array [

    - `id` string

      **Example:** `400561078544646131`
    - `payment_line_id` string

      **Example:** `767c4f87-bd05-4592-9ab0-374d4183fe59`
    - `payment_channel` string

      **Example:** `bogus`
    - `payment_method` string

      **Example:** `bogus_gateway`
    - `refund_price` string

      **Example:** `2.00`
    - `refund_status` string

      **Example:** `finished`
    - `finished_at` string

      **Example:** `2024-07-10T08:06:43Z`
    *   ]
  - `additional_total` string

    **Example:** `0.00`
  - `additional_prices` object[]

    *   Array [

    - `name` string

      **Example:**
    - `price` string

      **Example:**
    - `biz_id` string

      **Example:**
    *   ]
  - `refund_tip` string

    **Example:** `0.00`
  - `order_id` string

    **Example:** `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**

**Schema | Example | Result**

**Schema**

- `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]"
  ]
}
```
