Zalo — Mẫu ZBS
Gửi tin ZBS qua số điện thoại (Send ZBS template message) — zalo.send_template
Send an approved ZBS template to a phone number. Costs money per message (from 200 VND).
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | có | không | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
phone | Số điện thoại | string | có | Recipient phone: 84987654321, +84987654321 or 0987654321. Pattern: ^\+?[0-9]{9,15}$. |
template_id | Mã template | string | có | ZBS template ID. |
template_data | Dữ liệu template | object | có | Template parameters; names come from get_template listParams. |
tracking_id | Mã theo dõi | string | có | Your reference for reconciliation; no special characters. Max length 48. |
sending_mode | Chế độ gửi | any | không | 1 normal (default); 3 over-quota, whitelisted OAs and tag 3 only. One of: 1, 3. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Gửi tin ZBS qua số điện thoại đã mã hóa (Send ZBS template message by hashed phone) — zalo.send_template_hashphone
Send an approved ZBS template to a SHA-256 hashed phone number. Costs money per message.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | có | không | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
hash_phone | Số điện thoại đã mã hóa | string | có | SHA-256 of the phone number. |
template_id | Mã template | string | có | ZBS template ID. |
template_data | Dữ liệu template | object | có | Template parameters; names come from get_template listParams. |
tracking_id | Mã theo dõi | string | có | Your reference for reconciliation; no special characters. Max length 48. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Gửi tin ZBS thử nghiệm (Send ZBS template message (development mode)) — zalo.send_template_dev
Test-send a ZBS template in development mode. Only admins of the App or OA can receive it.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
phone | Số điện thoại | string | có | Recipient phone: 84987654321, +84987654321 or 0987654321. Pattern: ^\+?[0-9]{9,15}$. |
template_id | Mã template | string | có | ZBS template ID. |
template_data | Dữ liệu template | object | có | Template parameters; names come from get_template listParams. |
tracking_id | Mã theo dõi | string | có | Your reference for reconciliation; no special characters. Max length 48. |
mode | Chế độ | any | không | Set by FLAE Always development. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Trạng thái tin ZBS (Get ZBS message status) — zalo.get_message_status
Get the delivery status of a ZBS message: -1 not found, 0 pushed, 1 delivered.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
message_id | Mã tin | string | có | msg_id returned by the send. |
phone | Số điện thoại | string | không |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Hạn mức ZBS (Get ZBS quota) — zalo.get_quota
Get the daily and remaining ZBS message quota of the OA.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | — |
Input
Không có input.
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Chất lượng gửi tin ZBS (Get ZBS quality) — zalo.get_quality
Get the OA's ZBS sending quality (last 48 hours and 7 days).
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | — |
Input
Không có input.
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Danh sách template ZBS (List ZBS templates) — zalo.list_templates
List ZBS templates, newest first.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
offset | Vị trí bắt đầu | integer | có | Min 0. |
limit | Số lượng | integer | có | Min 1. Max 100. |
status | Trạng thái | integer | không | 1 ENABLE, 2 PENDING_REVIEW, 3 REJECT, 4 DISABLE; omit for all. Min 1. Max 4. |
filterPreset | Bộ lọc | integer | không | 0 all OA templates, 1 only those created by this App. One of: 0, 1. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Chi tiết template ZBS (Get ZBS template) — zalo.get_template
Get a ZBS template: status, listParams, listButtons, price_sdt (phone) and price_uid.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
template_id | Mã template | string | có | ZBS template ID. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Dữ liệu mẫu template ZBS (Get ZBS template sample data) — zalo.get_template_sample_data
Get sample values for the parameters of a ZBS template.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
template_id | Mã template | string | có | ZBS template ID. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Tạo template ZBS (Create ZBS template) — zalo.create_template
Create a ZBS template (100 per day). It starts as PENDING_REVIEW; Zalo reports the result by webhook.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
template_name | Tên template | string | có | Max length 60. |
template_type | Loại template | integer | có | 1 custom, 2 OTP, 3 payment request, 4 voucher, 5 service rating. One of: 1, 2, 3, 4, 5. |
tag | Loại nội dung | string | có | 1 transaction, 2 customer care, 3 promotion. One of: 1, 2, 3. |
layout | Bố cục | object | có | {header, body, footer}, each with a components list. |
params | Tham số | array of object | có | [{name, type, sample_value}]. |
note | Ghi chú | string | có | Max length 400. |
tracking_id | Mã theo dõi | string | có | Max length 48. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Sửa template ZBS (Edit ZBS template) — zalo.edit_template
Edit a ZBS template. Only templates in REJECT status can be edited (100 per day).
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
template_id | Mã template | string | có | ZBS template ID. |
template_name | Tên template | string | có | Max length 60. |
template_type | Loại template | integer | có | 1 custom, 2 OTP, 3 payment request, 4 voucher, 5 service rating. One of: 1, 2, 3, 4, 5. |
tag | Loại nội dung | string | có | 1 transaction, 2 customer care, 3 promotion. One of: 1, 2, 3. |
layout | Bố cục | object | có | {header, body, footer}, each with a components list. |
params | Tham số | array of object | có | [{name, type, sample_value}]. |
note | Ghi chú | string | có | Max length 400. |
tracking_id | Mã theo dõi | string | có | Max length 48. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Tải ảnh template ZBS (Upload ZBS template image) — zalo.upload_template_image
Upload a JPG or PNG (max 500 KB) for a ZBS template. Returns media_id.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
file_url | Đường dẫn tệp | string | có | HTTPS URL of the file to upload (max 500000 bytes). Pattern: ^https://. |
file_name | Tên tệp | string | không | File name to send to Zalo. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Đánh giá của khách hàng (List ZBS ratings) — zalo.list_ratings
List customer ratings for a service-rating ZBS template created by this App.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
template_id | Mã template | string | có | ZBS template ID. |
from_time | Từ | integer | có | Start, ms timestamp. |
to_time | Đến | integer | có | End, ms timestamp. |
offset | Vị trí bắt đầu | integer | có | Min 0. |
limit | Số lượng | integer | có | Min 1. Max 100. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |
Phản hồi nhanh của khách hàng (List ZBS quick responses) — zalo.list_quick_responses
List quick-response button replies customers sent to a ZBS template.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
template_id | Mã template | string | có | ZBS template ID. |
from_time | Từ | integer | có | Start, ms timestamp. |
to_time | Đến | integer | có | End, ms timestamp. |
offset | Vị trí bắt đầu | integer | có | Min 0. |
limit | Số lượng | integer | có | Min 1. Max 100. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | Zalo response data. |