Gửi ZNS với Journey Token
POST /SendZNSJourney HTTP/1.1
Host: $BASE_URL.Zalo
Content-Type: application/json
Accept: */*
Content-Length: 139
{
"journey_id": "text",
"oa_id": "text",
"phone": "text",
"template_data": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"template_id": 1,
"tracking_id": "text"
}
A successful response
{
"campaign_id": "text",
"created_at": "2025-08-02T16:16:32.660Z",
"delivery_status": "unknown",
"delivery_time": "2025-08-02T16:16:32.660Z",
"error_code": 1,
"error_message": "text",
"fee_main": 1,
"fee_token": 1,
"feedback": [
"text"
],
"id": "text",
"is_charged": true,
"journey_id": "text",
"msg_id": "text",
"note": "text",
"oa_id": "text",
"phone": "text",
"rate": 1,
"sent_time": "2025-08-02T16:16:32.660Z",
"shop_id": "text",
"status": "Z",
"submit_time": "2025-08-02T16:16:32.660Z",
"template_data": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"template_id": 1,
"timeout": 1,
"tracking_id": "text",
"type": "unknown",
"updated_at": "2025-08-02T16:16:32.660Z",
"user_id": "text",
"zl_user_id": "text"
}
Request:
curl --location '$BASE_URL.Zalo/SendZNSJourney' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
"journey_id": "<int64>",
"oa_id": "<int64>",
"phone": "<string>",
"template_data": {
"property1": "string",
"property2": "string"
},
"template_id": "<int>",
"tracking_id": "<string>"
}'
Response:
{
"created_at": "<dateTime>",
"delivery_time": "<dateTime>",
"id": "<int64>",
"is_charged": "<boolean>",
"journey_id": "<string>",
"msg_id": "<string>",
"msg_type": "journey",
"phone": "<string>",
"price": "<integer>",
"sent_time": "<dateTime>",
"template_id": "<integer>",
"timeout": "<integer>",
"tracking_id": "<string>",
"updated_at": "<dateTime>"
}
Cấu trúc body của request
oa_id
int64
ID của OA
journey_id
int64
ID journey token
template_id
int
ID của mẫu tin
phone
string
Số điện thoại người nhận
template_data
object
Các thuộc tính của mẫu tin mà bạn đã đăng ký với Zalo
Lưu ý: Cấu trúc template_data được quy định riêng ứng với từng mẫu tin
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í
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
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