---
sourceType: official-guide
sourceTypeMatchedRule: fallback
slug: ZBS/quan-ly-template/template-api/api-lay-du-lieu-mau-cua-template
title: API Lấy dữ liệu mẫu của Template
---
# API Lấy dữ liệu mẫu của Template

:::warning Lưu ý
**Quyền cần có:** Quản lý Message Template
:::

## HTTP request

- **URL:** https://business.openapi.zalo.me/template/sample-data 
- **Method:** GET 
- **Content Type:** application/json 
- **Response Type:** application/json

## Example request
```bash
curl
-X GET
-H "Content-Type: application/json"
"https://business.openapi.zalo.me/template/sample-data?template_id=12345"
```
### Tham số header

| Tham số | Kiểu dữ liệu | Tính bắt buộc | Mô tả |
| --- | --- | --- | --- |
| [access_token](/docs/OA/bat-dau/xac-thuc-va-uy-quyen-cho-ung-dung-new) | string | yes | Đoạn mã cần truyền vào để xác minh quyền sử dụng API. Xem thêm [tài liệu tham khảo](/docs/OA/bat-dau/xac-thuc-va-uy-quyen-cho-ung-dung-new) |


### Tham số

| Tham số | Kiểu dữ liệu | Tính bắt buộc | Mô tả |
| --- | --- | --- | --- |
| template_id | string | yes | ID của template cần lấy thông tin. |


## Example respond
```json
{
   "message": "Success",
   "data": {
       "balance_debt": 2000,
       "due_date": "01/01/1970",
       "number_debt": 2000,
       "customer_name": "customer_name_sample"
   },
   "error": 0
}
```
### Cấu trúc respond

| Thuộc tính | Kiểu dữ liệu | Mô tả |
| --- | --- | --- |
| data | object | Chứa tham số và dữ liệu mẫu của template bạn cần truy xuất. |
