# Danh sách page

* Lấy danh sách các page còn hạn sử dụng.
* Chú ý: Dữ liệu rất ít khi bị thay đổi, bạn có thể cache dữ liệu trên hệ thống của bạn để giảm tải việc phải gọi API liên tục, thời gian cache khuyến cáo là 8h.

## Request

* Xem sample Postman [tại đây](https://www.postman.com/nhanh-vn/vpage-open-nhanh-vn/request/rcex7re/page-list?tab=body).

```curl
curl --location 'https://vpage.open.nhanh.vn/v3.0/page/list?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": { },
    "paginator": {
        "size": 30, 
        "sort": {"createdAt": "desc"}
    }
}'
```

### Filters

| Key      | Type  | Description    |
| -------- | ----- | -------------- |
| ids      | array | Mảng page ids  |
| channels | array | Mảng kênh chat |

### Paginator

| Key  | Type  | Description                                                |
| ---- | ----- | ---------------------------------------------------------- |
| size | int   | Số lượng bản ghi trên 1 trang. Tối đa không quá 50         |
| next | array | Mảng dữ liệu next (được trả về từ trang trước đó - nếu có) |
| sort | array | Mảng dữ liệu các tiêu chí sort. Xem bảng bên dưới          |

* sort

| Key       | Description        | Value     |
| --------- | ------------------ | --------- |
| createdAt | Thời gian tạo page | ASC, DESC |
| name      | Page name          | ASC, DESC |

## 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": [
            1684232267000,
            13
        ]
    },
    "data": [
        {
            "id": "562525723619135",
            "name": "Good bag 2",
            "channel": 1,
            "createdAt": 1743839994,
            "expiredAt": 2692630800
        },
        {
            "id": "596777126857368",
            "name": "Good bag 1",
            "channel": 1,
            "createdAt": 1743839994,
            "expiredAt": 2692630800
        }
    ]
}
```


---

# 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/vpage/page_list.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.
