Lấy danh sách tin nhắn
A successful response
POST $BASE_URL.Zalo/ListMessages HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 419
{
"filter": {
"campaign_id": "text",
"date_from": "2025-11-02T22:12:50.529Z",
"date_to": "2025-11-02T22:12:50.529Z",
"delivery_status": "unknown",
"is_charged": true,
"is_development": true,
"journey_id": "text",
"msg_id": "text",
"msg_type": "unknown",
"oa_id": "text",
"phone": "text",
"status": "Z",
"template_id": 1,
"time_type": "unknown",
"tracking_id": "text",
"user_id": "text"
},
"paging": {
"after": "text",
"before": "text",
"limit": 1,
"sort": "text"
}
}A successful response
{
"messages": [
{
"campaign_id": "text",
"created_at": "2025-11-02T22:12:50.529Z",
"delivery_status": "unknown",
"delivery_time": "2025-11-02T22:12:50.529Z",
"error_code": 1,
"error_message": "text",
"fee_main": 1,
"fee_token": 1,
"feedback": [
"text"
],
"id": "text",
"is_charged": true,
"is_development": true,
"journey_id": "text",
"msg_id": "text",
"note": "text",
"oa_id": "text",
"phone": "text",
"rate": 1,
"request_time": "2025-11-02T22:12:50.529Z",
"sent_time": "2025-11-02T22:12:50.529Z",
"shop_id": "text",
"status": "Z",
"submit_time": "2025-11-02T22:12:50.529Z",
"template_data": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"template_id": 1,
"timeout": 1,
"tracking_id": "text",
"type": "unknown",
"updated_at": "2025-11-02T22:12:50.529Z",
"user_id": "text",
"zl_user_id": "text"
}
],
"paging": {
"after": "text",
"before": "text",
"limit": 1,
"next": "text",
"prev": "text",
"sort": "text"
}
}Request:
curl --location '$BASE_URL.Zalo/ListMessages' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
"filter": {
"date_from": "2023-08-02T14:15:22Z",
"date_to": "2023-08-03T14:15:22Z"
},
"paging": {
"limit": 50
}
}'Response:
{
"messages": [
{
"campaign_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"delivery_status": "unknown",
"delivery_time": "2019-08-24T14:15:22Z",
"error_code": 0,
"error_message": "string",
"fee_main": 0,
"fee_token": 0,
"feedback": [
"string"
],
"id": "string",
"is_charged": true,
"is_development": true,
"journey_id": "string",
"msg_id": "string",
"note": "string",
"oa_id": "string",
"phone": "string",
"rate": 0,
"sent_time": "2019-08-24T14:15:22Z",
"shop_id": "string",
"status": "Z",
"submit_time": "2019-08-24T14:15:22Z",
"template_data": {
"property1": "string",
"property2": "string"
},
"template_id": 0,
"timeout": 0,
"tracking_id": "string",
"type": "unknown",
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "string"
}
],
"paging": {
"after": "string",
"before": "string",
"limit": 0,
"next": "string",
"prev": "string",
"sort": "string"
}
}Cấu trúc body của request
campaign_id
int64
ID của chiến dịch
oa_id
string
ID của OA
template_id
integer
ID của mẫu tin
journey_id
int64
ID của journey
msg_id
string
ID của thông báo ZNS
msg_type
string
Enum:
"text": Tin dạng văn bản
"otp": Tin xác thực
"table": Tin dạng bảng
"rating": Tin đánh giá "response button": Tin response button
"payment_request": Tin yêu cầu thanh toán
"voucher": Tin voucher
"custom": Tin tinh chỉnh
is_development
boolean
True: Tin ZNS ở chế độ phát triển thử nghiệm
False: Tin ZNS không ở chế độ phát triển thử nghiệm
is_charged
bool
Tính phí hay không
delivery_status
string
Enum: "unknown" "received" "seen"
phone
string
Số điện thoại người nhận
status
string
Trạng thái
Z: Mới tạo
P: Enable
N: Disable
date_from
string<date-time>
Ngày bắt đầu
date_to
string<date-time>
Ngày kết thúc
time_type
string (otTimeFilter)
request_time: Thời gian gửi tin
updated_time: Thời gian cập nhật của tin
submit_time: Thời gian cập nhật của tin đánh giá
Lưu ý: Nếu tham số time_type không được truyền, mặc định
time_type = updated_time
tracking_id
string
Mã số đánh dấu lần gọi API của bạn, do bạn định nghĩa. Bạn có thể dùng tracking_id để đối soát mà không phụ thuộc vào message_id của eTelecom cung cấp.
Cấu trúc thuộc tính dữ liệu trả về
id
int64
ID tin nhắn trên hệ thống của eTelecom
shop_id
int64
ID cửa hàng trên hệ thống của eTelecom
user_id
int64
ID người gửi tin trên hệ thống của eTelecom
campaign_id
int64
ID của chiến dịch
delivery_status
string
Unkown: Không xác định
Received: Đã nhận
Seen: Đã xem
delivery_time
string<date-time>
Thời gian thiết bị của người dùng nhận được thông báo ZNS
error_code
int
Mã lỗi
error_message
string
Thông báo lỗi
fee_main
int
Phí chính
fee_token
int
Phí khởi tạo token
is_charged
boolean
True: Tin ZNS được tính phí
False: Tin ZNS không được tính phí
is_development
boolean
True: Tin ZNS ở chế độ phát triển thử nghiệm
False: Tin ZNS không ở chế độ phát triển thử nghiệm
journey_id
string
ID của journey
msg_id
string
ID của thông báo ZNS
type
string
template: ZNS thường
journey: ZNS journey
status
string
Trạng thái
Z: Mới tạo
P: Enable
N: Disable
rate
integer
Số sao được khách hàng đánh giá
note
string
Phần ghi chú thêm của khách hàng
feedback
array
Phần nhận xét của khách hàng
submit_time
string<date-time>
Thời điểm khách hàng gửi đánh giá
template_data
object
Tham số tin nhắn
phone
string
Số điện thoại người nhận
sent_time
string<date-time>
Thời gian gửi thông báo ZNS
template_id
integer
ID của mẫu tin
timeout
integer
Thời gian tối đa mà hệ thống xử lý yêu cầu
tracking_id
string
Mã số đánh dấu lần gọi API của bạn, do bạn định nghĩa. Bạn có thể dùng tracking_id để đối soát mà không phụ thuộc vào message_id của eTelecom cung cấp.
updated_at
string<date-time>
Ngày cập nhật
created_at
string<date-time>
Ngày tạo
Last updated