# Danh sách trả hàng hoàn tiền

* API này dùng để lấy [danh sách yêu cầu trả hàng hoàn tiền trên sàn](https://nhanh.vn/ecommerce/manage/return): Shopee, Tiktok, Lazada.

## Request

* Xem [common request params](/v3/readme.md#request-params).

```curl
curl --location --globoff 'https://pos.open.nhanh.vn/v3.0/ecom/return?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": {
        "appId": 8195
    },
    "paginator": {
        "icpp": 50  
    }
}'
```

### Filters

| Key                            | Type                       | Description                                                                                                                                     |
| ------------------------------ | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| appId                          | int $$^{{\color{red}\*}}$$ | [ID các sàn trên Nhanh.vn](/v3/modelconstant.md#ecommerce-appid). Lưu ý: chỉ hỗ trợ 3 sàn: Shopee / TikTok / Lazada                             |
| shopIds                        | array                      | List ID shop của gian hàng trên sàn                                                                                                             |
| returnIdOrReturnTrackingNumber | string                     | ID yêu cầu hoàn tiền / Mã vận đơn trả                                                                                                           |
| originalEcomOrderId            | string                     | ID đơn hàng gốc trên sàn                                                                                                                        |
| createdFromAt                  | int                        | Thời gian tạo từ (timestamp)                                                                                                                    |
| createdToAt                    | int                        | Thời gian tạo đến (timestamp)                                                                                                                   |
| updatedFromAt                  | int                        | Thời gian cập nhật từ (timestamp)                                                                                                               |
| updatedToAt                    | int                        | Thời gian cập nhật đến (timestamp)                                                                                                              |
| nhanhStatuses                  | array                      | <p>List ID trạng thái trả hàng hoàn tiền<br>1: Đã hoàn tiền<br>2: Đang xử lý<br>3: Đã hủy yêu cầu<br>4: Đang khiếu nại<br>5: Đang hoàn tiền</p> |

## Response

* Xem cấu trúc chung [tại đây](/v3/readme.md#response).

### Failed response

* Xem các mã lỗi chung [tại đây](/v3/readme.md#failed-response).

### Successful response

```json
{
  "code": 1,
  "paginator": {
    "next": {
      "id": "(string) next ID"
    }
  },
  "data": [
    {
      "shopId": "(string) ID Shop",
      "returnId": "(string) ID trả hàng hoàn tiền",
      "businessId": "(int) ID doanh nghiệp",
      "returnType": "(int) ID returnType (1: Hoàn tiền ngay, 2: Trả hàng và hoàn tiền, 3: Đổi mới",
      "originalEcomOrderId": "(string) ID đơn hàng gốc",
      "reasonInfor": {
        "reasonId": "(string) ID lý do trên sàn",
        "reasonName": "(string) Tên trạng thái trên sàn"
      },
      "productsInfor": [
        {
          "image": "(string) Đường dẫn ảnh sản phẩm trên sàn",
          "name": "(string) Tên sản phẩm trên sàn",
          "quantity": "(double) Số lượng sản phẩm",
          "price":"(double) Giá sản phẩm",
          "sku": "(string) Mã SKU trên sàn"
        }
      ],
      "amount": "(double) Tổng tiền hoàn",
      "ecomStatus": {
        "id": "(string) Mã trạng thái yêu cầu trả hàng trên sàn",
        "name": "(string) Tên trạng thái yêu cầu trả hàng trên sàn"
      },
      "nhanhStatus": {
        "id": "(int) ID trạng thái yêu cầu trả hàng trên Nhanh ",
        "name": "(string) Tên trạng thái yêu cầu trả hàng trên Nhanh"
      },
      "createdAt": "(int) Thời gian tạo (timestamp)",
      "updateAt": "(int) Thời gian cập nhật (timestamp)"
    }
  ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.nhanh.vn/v3/ecom/return.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
