Khởi tạo Template ZNS
API này cho phép bạn khởi tạo một Template Zalo Notification Service (ZNS) với đầy đủ nội dung hiển thị và các tham số động. Khi gửi request, bạn có thể định nghĩa:
-
Thông tin cơ bản:
name,description,title -
Nội dung hiển thị:
-
paragraphs: danh sách đoạn văn bản
-
tables: bảng dữ liệu động với label và key
-
buttons: danh sách nút bấm kèm liên kết hoặc hành động
-
Hình ảnh & logo: logoLight, logoDark, images
-
Tham số động (params): cho phép chèn giá trị thực tế vào template (ví dụ:
ustomer_fullname,order_code,order_status) -
Thông tin bổ sung: note, status
-
Endpoint
🔗Endpoint Staging
Endpoint
POST https://staging.manage-api.miniap.vn/api/external/zns-template/create
🔗Endpoint Production
Endpoint
POST https://manage-api.miniap.vn/api/external/zns-template/create
Dữ liệu được gửi đi (Request Body)
- Response
{
"name": "Khảo sát 2/7/2025",
"description": "Khảo sát 2/7/2025",
"title": "Xin chào <customer_fullname>,",
"paragraphs": [
{
"id": "10c8db12-7f66-4b53-a79c-22b5a01dac49",
"value": "Cảm ơn bạn đã mua sản phẩm tại cửa hàng"
}
],
"tables": [
{
"label": "Mã đơn hàng",
"key": "<order_code>"
},
{
"label": "Trạng thái",
"key": "<order_status>"
}
],
"buttons": [
{
"value": "https://manage.miniai.vn/marketing/uid-templates/new",
"type": "1",
"label": "Nhận"
}
],
"logoLight": "",
"logoDark": "",
"images": [],
"params": [
{
"key": "customer_fullname",
"label": "Customer fullname"
},
{
"key": "order_code",
"label": "Order code"
},
{
"key": "order_status",
"label": "Order status"
}
],
"note": "test",
"status": "DRAFT"
}
Phản hồi (Response)
- Response
{
"template": {
"name": "Khảo sát 2/7/2025",
"description": "Khảo sát 2/7/2025",
"title": "Xin chào <customer_fullname>,",
"tables": [
{
"label": "Mã đơn hàng",
"key": "<order_code>"
},
{
"label": "Trạng thái",
"key": "<order_status>"
}
],
"buttons": [
{
"value": "https://manage.miniai.vn/marketing/uid-templates/new",
"label": "Nhận",
"type": "1"
}
],
"params": [
{
"label": "Customer fullname",
"key": "customer_fullname"
},
{
"label": "Order code",
"key": "order_code"
},
{
"label": "Order status",
"key": "order_status"
}
],
"paragraphs": [
{
"value": "Cảm ơn bạn đã mua sản phẩm tại cửa hàng",
"key": "10c8db12-7f66-4b53-a79c-22b5a01dac49"
}
],
"logoDark": "",
"logoLight": "",
"images": [],
"note": "test",
"shopId": "64204a17a5a97a86f12e1f0a",
"status": "DRAFT",
"isSync": false,
"_id": "68c8ee675f8f83fc813e7830",
"createdAt": "2025-09-16T04:58:15.668Z",
"updatedAt": "2025-09-16T04:58:15.668Z",
"id": "68c8ee675f8f83fc813e7830"
}
}