# Danh sách gian hàng trên sàn

* API này dùng để lấy [danh sách gian hàng trên sàn](https://nhanh.vn/ecommerce/manage/setting): Shopee, Tiktok, Lazada, Tiki, Sendo.

## Request

* Xem [common request params](https://apidocs.nhanh.vn/v3/readme#request-params).

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

### Filters

| Key    | Type  | Description                                                                                                     |
| ------ | ----- | --------------------------------------------------------------------------------------------------------------- |
| appIds | array | [Id các sàn trên Nhanh.vn](https://apidocs.nhanh.vn/v3/modelconstant#ecommerce-appid), để trống để lấy toàn bộ. |

## Response

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

### Failed response

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

### Successful response

```json
{
    "code": 1,
    "paginator": {
        "next": "(int) ID bản ghi tiếp theo"
    },
    "data": [
        {
          "appId": "(int) ID sàn",
          "shop": {
              "id": "(string) ID gian hàng",
              "name": "(string) Tên gian hàng"
          },
          "expriredAt": "(int) Thời gian hết hạn gian hàng",
          "createdAt": "(int) Thời gian kết nối gian hàng"
        },
      {
        "appId": "(int) ID sàn",
        "shop": {
          "id": "(string) ID gian hàng",
          "name": "(string) Tên gian hàng"
        },
        "expriredAt": "(int) Thời gian hết hạn gian hàng",
        "createdAt": "(int) Thời gian kết nối gian hàng"
      }
    ]    
}
```
