# Danh sách thương hiệu

* API này dùng để lấy [danh sách thương hiệu](https://nhanh.vn/product/brand/index).

## Request

* Xem [common request params](https://apidocs.nhanh.vn/v3/readme#request-params).
* Xem [Postman sample](https://www.postman.com/nhanh-vn/pos-open-nhanh-vn/request/svrw042/product-brand).

```curl
curl --location 'https://pos.open.nhanh.vn/v3.0/product/brand?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json'
--data '{
    "filters": {
        "status": 1
    }
}'
```

### Filters

| Key    | Type   | Description                                                  |
| ------ | ------ | ------------------------------------------------------------ |
| ids    | array  | Mảng ID thương hiệu, tối đa 100                              |
| name   | string | Tên thương hiệu                                              |
| code   | string | Mã thương hiệu                                               |
| status | int    | <p>Trạng thái thương hiệu:<br>1 = Active<br>2 = Inactive</p> |

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