> 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/source.md).

# Nguồn đơn hàng

* API này dùng để lấy [danh sách nguồn đơn hàng](https://nhanh.vn/store/traffic/source).

## Request

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

```curl
curl --location 'https://pos.open.nhanh.vn/v3.0/order/source?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": {
        "ids": [100, 101],
    },
    "paginator": {
        "size": 50
    }
}'
```

### Filters

| Key | Type  | Description                        |
| --- | ----- | ---------------------------------- |
| ids | array | Mảng ID nguồn đơn hàng, tối đa 100 |

## 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": "Giá trị để lấy dữ liệu trang tiếp theo"
      },
      "data": [
        {
            "id": "(int) ID nguồn 1",
            "name": "(string) Tên nguồn 1",
            "status": "(int) Trạng thái (1 = Active, 2 = Inactive)",
            "createdAt": (int) Thời gian tạo (định dạng timestamp)
        },
        {
            "id": "(int) ID nguồn 2",
            "name": "(string) Tên nguồn 2",
            "status": "(int) Trạng thái (1 = Active, 2 = Inactive)",
            "createdAt": (int) Thời gian tạo (định dạng timestamp)
         }
      ]
  }
```
