---
sourceType: api-reference
sourceTypeMatchedRule: openApis
slug: MA/openApis/partner/kyb/listPermits
title: Lấy danh sách loại giấy tờ cần thiết
---
Được sử dụng để lấy danh sách các loại giấy tờ cần thiết cho từng danh mục Mini App.

### Parameters

| Property       | Type                | Required | Description                                |
| -------------- | ------------------- | -------- | ------------------------------------------ |
| categoryId     | String              | true     | Danh mục của ứng dụng (ví dụ: "ECOMMERCE") |
| subCategoryIds | List&lt;Integer&gt; | true     | Danh sách ID danh mục con (ví dụ: [1109])  |

:::tip
Các thông tin cần thiết để gọi API này (như `categoryId`, `subCategoryIds`) có thể lấy từ API [Lấy thông tin Mini App](/docs/MA/openApis/partner/apis/getAppInfo).
:::

### Return Values

| Property | Type                       | Description                                              |
| -------- | -------------------------- | -------------------------------------------------------- |
| error    | int                        | Mã lỗi của kết quả trả về, bằng 0 nếu request thành công |
| message  | String                     | Lời nhắn chi tiết tương ứng với mã lỗi                   |
| permits  | List&lt;PermitCategory&gt; | Danh sách các loại giấy tờ cần thiết                     |

#### PermitCategory

| Property     | Type               | Description                               |
| ------------ | ------------------ | ----------------------------------------- |
| id           | Integer            | ID của danh mục giấy tờ                   |
| categoryId   | String             | Mã danh mục (ví dụ: "MEDIA", "ECOMMERCE") |
| categoryName | String             | Tên danh mục (ví dụ: "Truyền thông")      |
| name         | String             | Tên chi tiết của danh mục giấy tờ         |
| permits      | List&lt;Permit&gt; | Danh sách các loại giấy tờ                |

#### Permit

| Property       | Type    | Description                                                            |
| -------------- | ------- | ---------------------------------------------------------------------- |
| documentTypeId | Integer | ID loại giấy tờ (khuyến nghị sử dụng)                                  |
| documentType   | String  | Tên loại giấy tờ (legacy)                                              |
| type           | String  | Loại giấy tờ: BUSINESS_LICENSE, ADDITIONAL_LICENSE, hoặc OWNER_LICENSE |

#### Sample Code


### Code sample — Java

```js
import java.util.Arrays;

import com.vng.zalo.miniapp.openapi.sdk.models.ListPermitsRequest;
import com.vng.zalo.miniapp.openapi.sdk.models.ListPermitsResponse;

ListPermitsRequest request = new ListPermitsRequest();
request.setCategoryId("ECOMMERCE");
request.setSubCategoryIds(Arrays.asList(1109));

ListPermitsResponse response = client.listPermits(request);
```

### Code sample — Node.js

```js
const { error, message, permits } = await client.getAppPermits({
  categoryId: "ECOMMERCE",
  subCategoryIds: [1109],
});
```
