> For the complete documentation index, see [llms.txt](https://apidocs.nhanh.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.nhanh.vn/v3/order/deleted.md).

# Danh sách đơn hàng đã xóa

* API này dùng để lấy [danh sách đơn hàng đã xóa](https://nhanh.vn/order/manage/deleted).
* API chỉ trả về các log có **Kiểu = Xóa đơn hàng**.

## Request

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

```curl
curl --location --globoff 'https://pos.open.nhanh.vn/v3.0/order/deleted?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": {
        "createdAtFrom": 1751302800,
        "createdAtTo": 1753635599
    },
    "paginator": {
        "size": 50
    }
}'
```

### Filters

| Key           | Type  | Description                                  |
| ------------- | ----- | -------------------------------------------- |
| ids           | array | Mảng ID đơn hàng (lọc nhiều đơn cùng lúc)    |
| createdAtFrom | int   | Thời gian xóa từ ngày (định dạng timestamp)  |
| createdAtTo   | int   | Thời gian xóa đến ngày (định dạng timestamp) |

### Paginator

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

## 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": "Dùng để lấy dữ liệu trang tiếp theo"
        }
    },
    "data": [
        {
            "id": "(int) ID đơn hàng đã xóa",
            "createdAt": "(int) Thời gian xóa (định dạng timestamp)",
            "createdById": "(int) ID người xóa"
        },
        {
            "id": "(int) ID đơn hàng đã xóa",
            "createdAt": "(int) Thời gian xóa (định dạng timestamp)",
            "createdById": "(int) ID người xóa"
        }
    ]
}
```
